michael@0: #!/usr/bin/env python michael@0: michael@0: import mozdevice michael@0: import mozlog michael@0: import unittest michael@0: from sut import MockAgent michael@0: michael@0: michael@0: class TestUnpack(unittest.TestCase): michael@0: michael@0: def test_unpackFile(self): michael@0: michael@0: commands = [("isdir /mnt/sdcard/tests", "TRUE"), michael@0: ("unzp /data/test/sample.zip /data/test/", michael@0: "Checksum: 653400271\n" michael@0: "1 of 1 successfully extracted\n")] michael@0: m = MockAgent(self, commands=commands) michael@0: d = mozdevice.DroidSUT("127.0.0.1", port=m.port, logLevel=mozlog.DEBUG) michael@0: # No error being thrown imples all is well michael@0: self.assertEqual(None, d.unpackFile("/data/test/sample.zip", michael@0: "/data/test/")) michael@0: michael@0: if __name__ == '__main__': michael@0: unittest.main()