testing/mozbase/mozdevice/tests/sut_chmod.py

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/testing/mozbase/mozdevice/tests/sut_chmod.py	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,21 @@
     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 TestChmod(unittest.TestCase):
    1.12 +
    1.13 +    def test_chmod(self):
    1.14 +
    1.15 +        command = [('chmod /mnt/sdcard/test', 'Changing permissions for /storage/emulated/legacy/Test\n'
    1.16 +                                              '        <empty>\n'
    1.17 +                                              'chmod /storage/emulated/legacy/Test ok\n')]
    1.18 +        m = MockAgent(self, commands=command)
    1.19 +        d = mozdevice.DroidSUT('127.0.0.1', port=m.port, logLevel=mozlog.DEBUG)
    1.20 +
    1.21 +        self.assertEqual(None, d.chmodDir('/mnt/sdcard/test'))
    1.22 +
    1.23 +if __name__ == '__main__':
    1.24 +    unittest.main()

mercurial