diff tests/unit.py @ 30:b27a7cb2dd5b

stub test for configuration providers
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 26 Mar 2012 17:05:02 -0700
parents c516ab813079
children da4d5c5831c6
line wrap: on
line diff
--- a/tests/unit.py	Mon Mar 26 17:00:12 2012 -0700
+++ b/tests/unit.py	Mon Mar 26 17:05:02 2012 -0700
@@ -4,6 +4,7 @@
 unit tests
 """
 
+import configuration
 import os
 import sys
 import unittest
@@ -36,6 +37,13 @@
 
     def test_configuration_providers(self):
         """test file-based configuration providers"""
+        # require json/simplejson and pyyaml to be installed
+
+        example = ExampleConfiguration()
+
+        # see what providers you got
+        json_provider = example.configuration_provider('json')
+        self.assertTrue(isinstance(json_provider, configuration.JSON))
 
 if __name__ == '__main__':
     unittest.main()