# HG changeset patch # User Jeff Hammel # Date 1332869376 25200 # Node ID 3c91bf85adb596af6d6bba9d197150b5b60bacfe # Parent 8909ae1cc4eafc7d353b8d4fcb1e1984a4cb9b4a actually test serialization diff -r 8909ae1cc4ea -r 3c91bf85adb5 tests/unit.py --- a/tests/unit.py Tue Mar 27 10:28:02 2012 -0700 +++ b/tests/unit.py Tue Mar 27 10:29:36 2012 -0700 @@ -43,7 +43,7 @@ def test_configuration_providers(self): """test file-based configuration providers""" - # require json/simplejson and pyyaml to be installed + # requires json/simplejson to be installed example = ExampleConfiguration() @@ -62,6 +62,8 @@ self.assertEqual(config, example.config) example.serialize(filename) self.assertTrue(os.path.exists(filename)) + serialized = json.loads(file(filename).read()) + self.assertEqual(serialized, config) if os.path.exists(filename): os.remove(filename)