def test_get_infrastructure_key_list_exception(self): """Get infrastructure key list with exception.""" provider = OCPProvider() interface = ProviderAccessor(provider.name()) with self.assertRaises(ProviderAccessorError): with patch.object(OCPProvider, "infra_key_list_implementation", side_effect=Exception("test")): interface.infrastructure_type(None, None)
def test_get_name_ocp(self): """Get name of ocp service provider.""" provider = OCPProvider() interface = ProviderAccessor(provider.name()) self.assertEqual(provider.name(), interface.service_name())
def test_get_name(self): """Get name of provider.""" provider = OCPProvider() self.assertEqual(provider.name(), 'OCP')
def test_get_name(self): """Get name of provider.""" provider = OCPProvider() self.assertEqual(provider.name(), Provider.PROVIDER_OCP)