testing/mozbase/mozdevice/tests/sut_time.py

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/testing/mozbase/mozdevice/tests/sut_time.py	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,18 @@
     1.4 +#/usr/bin/env python
     1.5 +import mozdevice
     1.6 +import mozlog
     1.7 +import unittest
     1.8 +from sut import MockAgent
     1.9 +
    1.10 +
    1.11 +class TestGetCurrentTime(unittest.TestCase):
    1.12 +
    1.13 +    def test_getCurrentTime(self):
    1.14 +        command = [('clok', '1349980200')]
    1.15 +
    1.16 +        m = MockAgent(self, commands=command)
    1.17 +        d = mozdevice.DroidSUT("127.0.0.1", port=m.port, logLevel=mozlog.DEBUG)
    1.18 +        self.assertEqual(d.getCurrentTime(), int(command[0][1]))
    1.19 +
    1.20 +if __name__ == '__main__':
    1.21 +    unittest.main()

mercurial