del cloud.supported_drivers['dummy']
def test_get_types(self):
- assert cloud.get_types() == ['my_provider']
+ assert list(cloud.get_types()) == ['my_provider']
def test_get_provider_conf(self):
expected = dummy_config['providers']['my_provider']
def test_get_user_ssh_pubkey(path, exists):
with patch('os.path.exists') as m_exists:
m_exists.return_value = exists
- with patch('__builtin__.open', mock_open(), create=True) as m_open:
+ with patch('teuthology.provision.cloud.util.open', mock_open(), create=True) as m_open:
util.get_user_ssh_pubkey(path)
if exists:
m_open.assert_called_once_with(path, 'rb')
continue
if isinstance(value, dict):
selective_update(a[key], value, func)
- if func(value, a[key]):
+ elif func(value, a[key]):
a[key] = value