X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_mon%2Ftest%2FOpenStack%2Ftest_settings.py;h=42619f88791c039e9a37a1c05c9becc5ece64eb0;hb=75512477988ae5e287433c6c859c61de1bc82318;hp=66da6af85ab1d39dd7f101913279b4fc51da4188;hpb=0215787170470859168d861b666c4e92b37e3743;p=osm%2FMON.git diff --git a/osm_mon/test/OpenStack/test_settings.py b/osm_mon/test/OpenStack/test_settings.py index 66da6af..42619f8 100644 --- a/osm_mon/test/OpenStack/test_settings.py +++ b/osm_mon/test/OpenStack/test_settings.py @@ -22,14 +22,10 @@ """Tests for settings for OpenStack plugins configurations.""" import logging - import os - import unittest -import mock - -from osm_mon.plugins.OpenStack.settings import Config +from osm_mon.core.settings import Config log = logging.getLogger(__name__) @@ -44,15 +40,7 @@ class TestSettings(unittest.TestCase): def test_set_os_username(self): """Test reading the environment for OpenStack plugin configuration.""" - os.environ["OS_USERNAME"] = "test" - self.cfg.read_environ("my_service") - - self.assertEqual(self.cfg.OS_USERNAME, "test") - - @mock.patch.object(os, "environ") - def test_read_environ(self, environ): - """Test reading environment variables for configuration.""" - self.cfg.read_environ("my_service") + os.environ["OS_NOTIFIER_URI"] = "test" + self.cfg.read_environ() - # Called for each key in the configuration dictionary - environ.assert_called_once + self.assertEqual(self.cfg.OS_NOTIFIER_URI, "test")