From 7060d68015b102fe3109683b387bd2218d9473d8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 4 Mar 2012 02:36:28 +0100 Subject: selftest: Add tests for NoneEnvironment. --- selftest/tests/test_target.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'selftest/tests') 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): -- cgit