Exemplo n.º 1
0
 def test_timeout_timeout(self):
     """Tests DeviceManager timeout, timeout case."""
     a = MockAgent(self, commands = [("isdir /mnt/sdcard/tests", "TRUE"),
                                     ("cd /mnt/sdcard/tests", ""),
                                     ("ls", "test.txt"),
                                     ("rm /mnt/sdcard/tests/test.txt", 0)])
     d = mozdevice.DroidSUT("127.0.0.1", port=a.port, logLevel=mozlog.DEBUG)
     d.default_timeout = 1
     exceptionThrown = False
     try:
         d.removeFile('/mnt/sdcard/tests/test.txt')
     except mozdevice.DMError:
         exceptionThrown = True
     self.assertEqual(exceptionThrown, True)
     a.should_stop = True
     a.wait()
Exemplo n.º 2
0
 def test_timeout_timeout(self):
     """Tests DeviceManager timeout, timeout case."""
     a = MockAgent(self,
                   commands=[("isdir /mnt/sdcard/tests", "TRUE"),
                             ("cd /mnt/sdcard/tests", ""),
                             ("ls", "test.txt"),
                             ("rm /mnt/sdcard/tests/test.txt", 0)])
     d = mozdevice.DroidSUT("127.0.0.1", port=a.port, logLevel=mozlog.DEBUG)
     d.default_timeout = 1
     exceptionThrown = False
     try:
         d.removeFile('/mnt/sdcard/tests/test.txt')
     except mozdevice.DMError:
         exceptionThrown = True
     self.assertEqual(exceptionThrown, True)
     a.should_stop = True
     a.wait()