summaryrefslogtreecommitdiff
path: root/selftest/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-03-04 02:36:28 +0100
committerJelmer Vernooij <jelmer@samba.org>2012-03-04 18:02:06 +0100
commit7060d68015b102fe3109683b387bd2218d9473d8 (patch)
treef2d22e6a92664dc584c911622919beb6cb0d2b59 /selftest/tests
parentaa7fa63bfaf0757ac4ff4112825333fb4524ce95 (diff)
downloadsamba-7060d68015b102fe3109683b387bd2218d9473d8.tar.gz
samba-7060d68015b102fe3109683b387bd2218d9473d8.tar.bz2
samba-7060d68015b102fe3109683b387bd2218d9473d8.zip
selftest: Add tests for NoneEnvironment.
Diffstat (limited to 'selftest/tests')
-rw-r--r--selftest/tests/test_target.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/selftest/tests/test_target.py b/selftest/tests/test_target.py
index 573b65db0a..6236dcbec9 100644
--- a/selftest/tests/test_target.py
+++ b/selftest/tests/test_target.py
@@ -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):