diff tests/unit.py @ 25:b39e550402ea

we now update configuration correctly
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 26 Mar 2012 15:55:05 -0700
parents 39f2611db9be
children c516ab813079
line wrap: on
line diff
--- a/tests/unit.py	Mon Mar 26 15:46:25 2012 -0700
+++ b/tests/unit.py	Mon Mar 26 15:55:05 2012 -0700
@@ -20,9 +20,17 @@
 
         # parse command line arguments
         options, args = example.parse(['-a', 'ts', '--develop', '-e', '/home/jhammel/bin/firefox'])
+
+        # ensure that the options appropriately get set
         self.assertEqual(bool(args), False) # no arguments
         self.assertEqual(options.develop, True)
-        self.assertEqual(options.activeTests, 'ts')
+        self.assertEqual(options.activeTests, ['ts'])
+        self.assertEqual(options.browser_path, '/home/jhammel/bin/firefox')
+
+        # ensure that the configuration appropriately gets updated
+        self.assertEqual(example.config['develop'], True)
+        self.assertEqual(example.config['activeTests'], ['ts'])
+        self.assertEqual(example.config['browser_path'], '/home/jhammel/bin/firefox')
 
 if __name__ == '__main__':
     unittest.main()