summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2017-12-05 10:42:14 +0000
committerGerrit Code Review <review@openstack.org>2017-12-05 10:42:14 +0000
commit14e77312dc57a1b6b807814c2396759d6b720af8 (patch)
treefde83af641ecb76868e3e3d066fdc656c8b65441
parent57db907ad931c29ee89d55600cdf728c7b81c7d1 (diff)
parente49dcb1995062e24d44a0691d6b8c0d8d1b7f64f (diff)
Merge "Replace six.iteritems() with .items()"
-rw-r--r--magnumclient/tests/osc/unit/osc_fakes.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/magnumclient/tests/osc/unit/osc_fakes.py b/magnumclient/tests/osc/unit/osc_fakes.py
index f28f910..2df0686 100644
--- a/magnumclient/tests/osc/unit/osc_fakes.py
+++ b/magnumclient/tests/osc/unit/osc_fakes.py
@@ -21,7 +21,6 @@ from keystoneauth1 import fixture
21import requests 21import requests
22import six 22import six
23 23
24
25AUTH_TOKEN = "foobar" 24AUTH_TOKEN = "foobar"
26AUTH_URL = "http://0.0.0.0" 25AUTH_URL = "http://0.0.0.0"
27USERNAME = "itchy" 26USERNAME = "itchy"
@@ -191,7 +190,7 @@ class FakeResource(object):
191 self._loaded = loaded 190 self._loaded = loaded
192 191
193 def _add_details(self, info): 192 def _add_details(self, info):
194 for (k, v) in six.iteritems(info): 193 for (k, v) in info.items():
195 setattr(self, k, v) 194 setattr(self, k, v)
196 195
197 def _add_methods(self, methods): 196 def _add_methods(self, methods):
@@ -202,7 +201,7 @@ class FakeResource(object):
202 @value. When users access the attribute with (), @value will be 201 @value. When users access the attribute with (), @value will be
203 returned, which looks like a function call. 202 returned, which looks like a function call.
204 """ 203 """
205 for (name, ret) in six.iteritems(methods): 204 for (name, ret) in methods.items():
206 method = mock.Mock(return_value=ret) 205 method = mock.Mock(return_value=ret)
207 setattr(self, name, method) 206 setattr(self, name, method)
208 207