summaryrefslogtreecommitdiff
path: root/selftest/tests
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-03-04 02:29:34 +0100
committerJelmer Vernooij <jelmer@samba.org>2012-03-04 18:02:06 +0100
commite7633d86c03c57b6fc8a4e5b4a26f7e9159c6ec7 (patch)
treeff9287f54583136da6f12feca6d67ccae51becfb /selftest/tests
parentc57ab7ba9d7e25ac18d1e9883d3fc86a688fa7be (diff)
downloadsamba-e7633d86c03c57b6fc8a4e5b4a26f7e9159c6ec7.tar.gz
samba-e7633d86c03c57b6fc8a4e5b4a26f7e9159c6ec7.tar.bz2
samba-e7633d86c03c57b6fc8a4e5b4a26f7e9159c6ec7.zip
selftest.target: Add tests for check.
Diffstat (limited to 'selftest/tests')
-rw-r--r--selftest/tests/test_target.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/selftest/tests/test_target.py b/selftest/tests/test_target.py
index 343de930cb..0abc79b6bb 100644
--- a/selftest/tests/test_target.py
+++ b/selftest/tests/test_target.py
@@ -63,3 +63,11 @@ class EnvironmentManagerTests(unittest.TestCase):
env = self.mgr.setup_env("something", "prefix")
self.assertEquals(env.name, "something")
self.assertEquals(env.prefix, "prefix")
+
+ def test_check(self):
+ env = self.mgr.setup_env("something", "prefix")
+ self.assertTrue(env.check())
+ self.assertTrue(self.mgr.check_env("something"))
+ env.check_ret = False
+ self.assertFalse(env.check())
+ self.assertFalse(self.mgr.check_env("something"))