diff options
author | gordon chung <gord@live.ca> | 2014-09-03 16:21:46 -0400 |
---|---|---|
committer | gordon chung <gord@live.ca> | 2014-10-02 15:10:45 +0000 |
commit | 7316dd16b8850270db27c1298dcf5a2223f2f1e1 (patch) | |
tree | e3b4f5b6f333e4889e2f4364168825f154dd961f /ceilometerclient/openstack/common/apiclient/fake_client.py | |
parent | 5aa2a69f36c1738d9cc24470e81651732f180859 (diff) | |
download | python-ceilometerclient-7316dd16b8850270db27c1298dcf5a2223f2f1e1.tar.gz |
sync oslo codeicehouse-eol1.0.12stable/icehouse
- sync code up to Change-Id: Ie6064e73abe4b0729498a0343d50e1be35684b75
- includes fix to resolve alarm-evaluator failure
- does not include openstack/common/strutils sync as it requires
test update
Co-Authored-By: Vaibhav Kale <vaibhav_kale@persistent.co.in>
Closes-Bug: #1357343
Change-Id: Ieec08520cb39c5bf2e795dfeb3e36e52c6fd2a82
Diffstat (limited to 'ceilometerclient/openstack/common/apiclient/fake_client.py')
-rw-r--r-- | ceilometerclient/openstack/common/apiclient/fake_client.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ceilometerclient/openstack/common/apiclient/fake_client.py b/ceilometerclient/openstack/common/apiclient/fake_client.py index e99947b..24807ad 100644 --- a/ceilometerclient/openstack/common/apiclient/fake_client.py +++ b/ceilometerclient/openstack/common/apiclient/fake_client.py @@ -33,7 +33,9 @@ from six.moves.urllib import parse from ceilometerclient.openstack.common.apiclient import client -def assert_has_keys(dct, required=[], optional=[]): +def assert_has_keys(dct, required=None, optional=None): + required = required or [] + optional = optional or [] for k in required: try: assert k in dct @@ -79,7 +81,7 @@ class FakeHTTPClient(client.HTTPClient): def __init__(self, *args, **kwargs): self.callstack = [] self.fixtures = kwargs.pop("fixtures", None) or {} - if not args and not "auth_plugin" in kwargs: + if not args and "auth_plugin" not in kwargs: args = (None, ) super(FakeHTTPClient, self).__init__(*args, **kwargs) |