Adds granularity support in OpenStack vim config
[osm/MON.git] / osm_mon / test / OpenStack / test_settings.py
index 66da6af..42619f8 100644 (file)
 """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")