Support py34 tox target.
OpenStack is making a push to move projects that had been tested on py33 to py34 because py34 will have a much larger install base (and is consequently easier to test). The python 3.4 json lib returns new and different error strings when json decoding fails. Remove assertions from test_load_list_from_json hat check these error strings, instead simply rely on assertRaises to assert that the appropriate error is thrown. Change-Id: Ia6603783014b0114de0f29664834d21196744774
This commit is contained in:
parent
117e7c0f77
commit
4ae6efd726
|
@ -272,8 +272,7 @@ class OSConfigApplierTestCase(testtools.TestCase):
|
|||
|
||||
fd, path = mkstemp()
|
||||
load_list = apply_config.load_list_from_json
|
||||
err = self.assertRaises(ValueError, load_list, path)
|
||||
self.assertEqual("No JSON object could be decoded", str(err))
|
||||
self.assertRaises(ValueError, load_list, path)
|
||||
write_contents(fd, json.dumps(["/tmp/config.json"]))
|
||||
json_obj = load_list(path)
|
||||
self.assertEqual(["/tmp/config.json"], json_obj)
|
||||
|
@ -282,9 +281,7 @@ class OSConfigApplierTestCase(testtools.TestCase):
|
|||
|
||||
fd, path = mkstemp()
|
||||
write_contents(fd, json.dumps({}))
|
||||
err = self.assertRaises(ValueError, load_list, path)
|
||||
self.assertEqual(
|
||||
"No list defined in json file: %s" % path, str(err))
|
||||
self.assertRaises(ValueError, load_list, path)
|
||||
|
||||
def test_default_templates_dir_current(self):
|
||||
default = '/usr/libexec/os-apply-config/templates'
|
||||
|
|
Loading…
Reference in New Issue