selftest: Add tests for NoneEnvironment.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 4 Mar 2012 01:36:28 +0000 (02:36 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 4 Mar 2012 17:02:06 +0000 (18:02 +0100)
selftest/tests/test_target.py

index 573b65d..6236dcb 100644 (file)
@@ -50,9 +50,26 @@ class DummyTarget(Target):
         return DummyEnvironment(name, prefix)
 
 
+class NoneEnvironmentTests(unittest.TestCase):
+
+    def setUp(self):
+        super(NoneEnvironmentTests, self).setUp()
+        self.env = NoneEnvironment()
+
+    def test_get_vars(self):
+        self.assertEquals({}, self.env.get_vars())
+
+    def test_check(self):
+        self.assertEquals(True, self.env.check())
+
+    def test_get_log(self):
+        self.assertEquals("", self.env.get_log())
+
+
 class EnvironmentManagerTests(unittest.TestCase):
 
     def setUp(self):
+        super(EnvironmentManagerTests, self).setUp()
         self.mgr = EnvironmentManager(DummyTarget())
 
     def test_none(self):