michael@0: #/usr/bin/env python 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 TestChmod(unittest.TestCase): michael@0: michael@0: def test_chmod(self): michael@0: michael@0: command = [('chmod /mnt/sdcard/test', 'Changing permissions for /storage/emulated/legacy/Test\n' michael@0: ' \n' michael@0: 'chmod /storage/emulated/legacy/Test ok\n')] michael@0: m = MockAgent(self, commands=command) michael@0: d = mozdevice.DroidSUT('127.0.0.1', port=m.port, logLevel=mozlog.DEBUG) michael@0: michael@0: self.assertEqual(None, d.chmodDir('/mnt/sdcard/test')) michael@0: michael@0: if __name__ == '__main__': michael@0: unittest.main()