Skip to content

Instantly share code, notes, and snippets.

@mriedem
Created February 25, 2016 23:04
Show Gist options
  • Save mriedem/54c70579b52d26d80af9 to your computer and use it in GitHub Desktop.
Save mriedem/54c70579b52d26d80af9 to your computer and use it in GitHub Desktop.
diff --git a/nova/tests/functional/api/client.py b/nova/tests/functional/api/client.py
index fe88814..451302a 100644
--- a/nova/tests/functional/api/client.py
+++ b/nova/tests/functional/api/client.py
@@ -170,6 +170,9 @@ class TestOpenStackClient(object):
headers['X-Auth-Token'] = auth_result['x-auth-token']
if self.microversion:
headers['X-OpenStack-Nova-API-Version'] = self.microversion
+ elif 'X-OpenStack-Nova-API-Version' in headers:
+ raise Exception('X-OpenStack-Nova-API-Version should be set on '
+ 'microversion attribute in API client.')
response = self.request(full_uri, **kwargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment