~jibel/wubi/lp-842397

« back to all changes in this revision

Viewing changes to tests/test_backend.py

  • Committer: Evan Dandrea
  • Date: 2011-09-22 16:33:35 UTC
  • Revision ID: evan.dandrea@canonical.com-20110922163335-vwjkvewqhn1wthwe
Properly parse the output of 7z's iso listing (LP: #856340).

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
        registry.set_value = self.save_registry
43
43
 
44
44
    def test_create_uninstaller(self):
45
 
        # We don't have decorators in Python 2.3
 
45
        # We don't have decorators in Python 2.3, so we can't use mock.patch
 
46
        # here.
46
47
        self.back.info.target_dir = '/tmp'
47
48
        self.back.info.registry_key = 'registry-key'
48
49
        self.back.info.distro = self.back.parse_isolist(
64
65
            'Did not install uninstaller binary.')
65
66
        os.remove('/tmp/uninstall-wubi.exe')
66
67
 
 
68
    def test_get_iso_file(self):
 
69
        # http://pad.lv/856340
 
70
        expected = ['%02d' % x for x in range(1,51)]
 
71
        self.assertEqual(expected,
 
72
            self.back.get_iso_file_names('tests/data/small.iso'))
 
73
 
67
74
if __name__ == '__main__':
68
75
    unittest.main()