1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

selftest.target: Add tests for get_running_env.

This commit is contained in:
Jelmer Vernooij 2012-03-04 02:31:32 +01:00
parent 0d50c4cf3c
commit 75eb57cff5

View File

@ -79,3 +79,10 @@ class EnvironmentManagerTests(unittest.TestCase):
env.log_ret = 'bla'
self.assertEquals('bla', env.get_log())
self.assertEquals('bla', self.mgr.getlog_env("something"))
def test_get_running_env(self):
env = self.mgr.setup_env("something", "prefix")
self.assertIs(env, self.mgr.get_running_env("something"))
def test_get_running_env_nonexistant(self):
self.assertIs(None, self.mgr.get_running_env("something"))