Merge "Replace six.iteritems() with .items()"
This commit is contained in:
commit
14e77312dc
|
@ -21,7 +21,6 @@ from keystoneauth1 import fixture
|
||||||
import requests
|
import requests
|
||||||
import six
|
import six
|
||||||
|
|
||||||
|
|
||||||
AUTH_TOKEN = "foobar"
|
AUTH_TOKEN = "foobar"
|
||||||
AUTH_URL = "http://0.0.0.0"
|
AUTH_URL = "http://0.0.0.0"
|
||||||
USERNAME = "itchy"
|
USERNAME = "itchy"
|
||||||
|
@ -191,7 +190,7 @@ class FakeResource(object):
|
||||||
self._loaded = loaded
|
self._loaded = loaded
|
||||||
|
|
||||||
def _add_details(self, info):
|
def _add_details(self, info):
|
||||||
for (k, v) in six.iteritems(info):
|
for (k, v) in info.items():
|
||||||
setattr(self, k, v)
|
setattr(self, k, v)
|
||||||
|
|
||||||
def _add_methods(self, methods):
|
def _add_methods(self, methods):
|
||||||
|
@ -202,7 +201,7 @@ class FakeResource(object):
|
||||||
@value. When users access the attribute with (), @value will be
|
@value. When users access the attribute with (), @value will be
|
||||||
returned, which looks like a function call.
|
returned, which looks like a function call.
|
||||||
"""
|
"""
|
||||||
for (name, ret) in six.iteritems(methods):
|
for (name, ret) in methods.items():
|
||||||
method = mock.Mock(return_value=ret)
|
method = mock.Mock(return_value=ret)
|
||||||
setattr(self, name, method)
|
setattr(self, name, method)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue