comparison tests/unit.py @ 37:a1f8dec4d4f9

we has another broken test
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 27 Mar 2012 09:52:51 -0700
parents d218df4d0b4c
children 8909ae1cc4ea
comparison
equal deleted inserted replaced
36:d218df4d0b4c 37:a1f8dec4d4f9
50 # see what providers you got 50 # see what providers you got
51 json_provider = example.configuration_provider('json') 51 json_provider = example.configuration_provider('json')
52 self.assertTrue(isinstance(json_provider, configuration.JSON)) 52 self.assertTrue(isinstance(json_provider, configuration.JSON))
53 53
54 # serialize to a temporary file 54 # serialize to a temporary file
55 filename = tempfile.mktemp() 55 filename = tempfile.mktemp(suffix='.json')
56 self.assertFalse(os.path.exists(filename))
56 config = {'browser_path': '/home/jhammel/bin/firefox', 57 config = {'browser_path': '/home/jhammel/bin/firefox',
57 'activeTests': ['ts']} 58 'activeTests': ['ts']}
58 example(config) 59 example(config)
59 config['test_timeout'] = 1200 # default 60 config['test_timeout'] = 1200 # default
60 self.assertEqual(config, example.config) 61 self.assertEqual(config, example.config)
62 example.serialize(filename)
63 self.assertTrue(os.path.exists(filename))
61 if os.path.exists(filename): 64 if os.path.exists(filename):
62 os.remove(filename) 65 os.remove(filename)
63 66
64 def test_required(self): 67 def test_required(self):
65 """ensure you have to have required values""" 68 """ensure you have to have required values"""