diff options
Diffstat (limited to 'functest/tests/unit/utils/test_env.py')
-rw-r--r-- | functest/tests/unit/utils/test_env.py | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/functest/tests/unit/utils/test_env.py b/functest/tests/unit/utils/test_env.py index 064ff988..49d2d974 100644 --- a/functest/tests/unit/utils/test_env.py +++ b/functest/tests/unit/utils/test_env.py @@ -16,7 +16,6 @@ import unittest from six.moves import reload_module from functest.utils import env -from functest.utils import constants class EnvTesting(unittest.TestCase): @@ -30,65 +29,27 @@ class EnvTesting(unittest.TestCase): def test_get_unset_unknown_env(self): del os.environ['FOO'] self.assertEqual(env.get('FOO'), None) - # Backward compatibilty (waiting for SDNVPN and SFC) - reload_module(env) - with self.assertRaises(AttributeError): - getattr(env.ENV, 'FOO') - reload_module(constants) - with self.assertRaises(AttributeError): - getattr(constants.CONST, 'FOO') def test_get_unknown_env(self): self.assertEqual(env.get('FOO'), 'foo') reload_module(env) - # Backward compatibilty (waiting for SDNVPN and SFC) - with self.assertRaises(AttributeError): - getattr(env.ENV, 'FOO') - reload_module(constants) - with self.assertRaises(AttributeError): - getattr(constants.CONST, 'FOO') def test_get_unset_env(self): del os.environ['CI_LOOP'] self.assertEqual( env.get('CI_LOOP'), env.INPUTS['CI_LOOP']) - # Backward compatibilty (waiting for SDNVPN and SFC) - reload_module(env) - self.assertEqual( - getattr(env.ENV, 'CI_LOOP'), env.INPUTS['CI_LOOP']) - reload_module(constants) - self.assertEqual( - getattr(constants.CONST, 'CI_LOOP'), - env.INPUTS['CI_LOOP']) def test_get_env(self): self.assertEqual( env.get('CI_LOOP'), 'weekly') - # Backward compatibilty (waiting for SDNVPN and SFC) - reload_module(env) - self.assertEqual(getattr(env.ENV, 'CI_LOOP'), 'weekly') - reload_module(constants) - self.assertEqual(getattr(constants.CONST, 'CI_LOOP'), 'weekly') def test_get_unset_env2(self): del os.environ['BUILD_TAG'] self.assertEqual( env.get('BUILD_TAG'), env.INPUTS['BUILD_TAG']) - # Backward compatibilty (waiting for SDNVPN and SFC) - reload_module(env) - self.assertEqual( - getattr(env.ENV, 'BUILD_TAG'), env.INPUTS['BUILD_TAG']) - reload_module(constants) - self.assertEqual( - getattr(constants.CONST, 'BUILD_TAG'), env.INPUTS['BUILD_TAG']) def test_get_env2(self): self.assertEqual(env.get('BUILD_TAG'), 'master') - # Backward compatibilty (waiting for SDNVPN and SFC) - reload_module(env) - self.assertEqual(getattr(env.ENV, 'BUILD_TAG'), 'master') - reload_module(env) - self.assertEqual(getattr(constants.CONST, 'BUILD_TAG'), 'master') if __name__ == "__main__": |