diff tests/unit.py @ 39:3c91bf85adb5

actually test serialization
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 27 Mar 2012 10:29:36 -0700
parents 8909ae1cc4ea
children 056280e7a6ea
line wrap: on
line diff
--- 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)