Implements filebased config, config override through env vars, use of osm
[osm/MON.git] / osm_mon / tests / core / test_database.py
index 482e58b..0329c74 100644 (file)
 import unittest
 from unittest import mock
 
+from osm_mon.core.config import Config
+
 from osm_mon.core.database import VimCredentials, DatabaseManager
 
 
 class DatbaseManagerTest(unittest.TestCase):
     def setUp(self):
         super().setUp()
+        self.config = Config()
 
     @mock.patch.object(DatabaseManager, "get_credentials")
     def test_get_vim_type(self, get_credentials):
@@ -41,6 +44,6 @@ class DatbaseManagerTest(unittest.TestCase):
         mock_creds.type = 'openstack'
 
         get_credentials.return_value = mock_creds
-        database_manager = DatabaseManager()
+        database_manager = DatabaseManager(self.config)
         vim_type = database_manager.get_vim_type('test_id')
         self.assertEqual(vim_type, 'openstack')