def test_env_not_in_context(self): # The function returns None if JUJU_ENV is not included in the context. with mock.patch("os.environ", {}): self.assertIsNone(juju_env())
def test_env_in_context(self): # The function returns the juju env if found in the execution context. with mock.patch("os.environ", {"JUJU_ENV": "test-env"}): self.assertEqual("test-env", juju_env())
def test_env_not_in_context(self): # The function returns None if JUJU_ENV is not included in the context. with mock.patch('os.environ', {}): self.assertIsNone(juju_env())
def test_env_in_context(self): # The function returns the juju env if found in the execution context. with mock.patch('os.environ', {'JUJU_ENV': 'test-env'}): self.assertEqual('test-env', juju_env())