Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 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())
Ejemplo n.º 3
0
 def test_get_name(self):
     """Get name of provider."""
     provider = OCPProvider()
     self.assertEqual(provider.name(), 'OCP')
Ejemplo n.º 4
0
 def test_get_name(self):
     """Get name of provider."""
     provider = OCPProvider()
     self.assertEqual(provider.name(), Provider.PROVIDER_OCP)