testing/mozbase/mozdevice/tests/sut_unpackfile.py

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:d05daf1cf4da
1 #!/usr/bin/env python
2
3 import mozdevice
4 import mozlog
5 import unittest
6 from sut import MockAgent
7
8
9 class TestUnpack(unittest.TestCase):
10
11 def test_unpackFile(self):
12
13 commands = [("isdir /mnt/sdcard/tests", "TRUE"),
14 ("unzp /data/test/sample.zip /data/test/",
15 "Checksum: 653400271\n"
16 "1 of 1 successfully extracted\n")]
17 m = MockAgent(self, commands=commands)
18 d = mozdevice.DroidSUT("127.0.0.1", port=m.port, logLevel=mozlog.DEBUG)
19 # No error being thrown imples all is well
20 self.assertEqual(None, d.unpackFile("/data/test/sample.zip",
21 "/data/test/"))
22
23 if __name__ == '__main__':
24 unittest.main()

mercurial