Exemple #1
0
 def test_get_configured_provider_cloud(self):
     config = {
         'region_name': 'westeros',
         'cloud': 'foo',
     }
     with patch.dict(openstack.__opts__, {'providers': {'my-openstack-cloud': {'openstack': config}}}):
         result = openstack.get_configured_provider()
         self.assertEqual(config, result)
 def test_get_configured_provider_cloud(self):
     config = {
         "region_name": "westeros",
         "cloud": "foo",
     }
     with patch.dict(
             openstack.__opts__,
         {"providers": {
             "my-openstack-cloud": {
                 "openstack": config
             }
         }},
     ):
         result = openstack.get_configured_provider()
         self.assertEqual(config, result)
Exemple #3
0
 def test_get_configured_provider_bad(self):
     with patch.dict(openstack.__opts__, {'providers': {}}):
         result = openstack.get_configured_provider()
         self.assertEqual(result, False)