def test_get_manager(self, zabbix_mock):
     os.environ["ZABBIX_URL"] = ""
     os.environ["ZABBIX_USER"] = ""
     os.environ["ZABBIX_PASSWORD"] = ""
     os.environ["ZABBIX_HOST"] = ""
     os.environ["ZABBIX_HOST_GROUP"] = ""
     manager = api.get_manager()
     self.assertIsInstance(manager, backends.Zabbix)
Exemple #2
0
 def test_get_manager(self, zabbix_mock):
     os.environ["ZABBIX_URL"] = ""
     os.environ["ZABBIX_USER"] = ""
     os.environ["ZABBIX_PASSWORD"] = ""
     os.environ["ZABBIX_HOST"] = ""
     os.environ["ZABBIX_HOST_GROUP"] = ""
     manager = api.get_manager()
     self.assertIsInstance(manager, backends.Zabbix)
 def test_get_manager_that_does_not_exist(self, zabbix_mock):
     os.environ["API_MANAGER"] = "doesnotexist"
     with self.assertRaises(ValueError):
         api.get_manager()
Exemple #4
0
 def test_get_manager_that_does_not_exist(self, zabbix_mock):
     os.environ["API_MANAGER"] = "doesnotexist"
     with self.assertRaises(ValueError):
         api.get_manager()