make python34 CI job to pass

remove _get_attr_metadata monkey_patch since it is for XML test.
remove iterkeys() call which is not py3.x compatible.

Change-Id: I46df0a3748f470521553793111a21eea72bd7663
Closes-bug: 1632714
This commit is contained in:
gong yong sheng 2016-10-12 22:08:22 +08:00 committed by gongysh
parent 65a5198d73
commit e3f0d522ba
2 changed files with 1 additions and 12 deletions
tackerclient
tacker/v1_0
tests/unit

@ -284,7 +284,7 @@ def parse_args_to_dict(values_specs):
_args = _parser.parse_args(_values_specs)
result_dict = {}
for opt in _options.iterkeys():
for opt in _options.keys():
_opt = opt.split('--', 2)[1]
_opt = _opt.replace('-', '_')
_value = getattr(_args, _opt)

@ -179,14 +179,6 @@ class CLITestV10Base(testtools.TestCase):
def _find_resourceid(self, client, resource, name_or_id):
return name_or_id
def _get_attr_metadata(self):
return self.metadata
client.Client.EXTED_PLURALS.update(constants.PLURALS)
client.Client.EXTED_PLURALS.update({'tags': 'tag'})
return {'plurals': client.Client.EXTED_PLURALS,
'xmlns': constants.XML_NS_V10,
constants.EXT_NS: {'prefix': 'http://xxxx.yy.com'}}
def setUp(self, plurals={}):
"""Prepare the test environment."""
super(CLITestV10Base, self).setUp()
@ -205,9 +197,6 @@ class CLITestV10Base(testtools.TestCase):
self.useFixture(fixtures.MonkeyPatch(
'tackerclient.tacker.v1_0.find_resourceid_by_id',
self._find_resourceid))
self.useFixture(fixtures.MonkeyPatch(
'tackerclient.v1_0.client.Client.get_attr_metadata',
self._get_attr_metadata))
self.client = client.Client(token=TOKEN, endpoint_url=self.endurl)
@mock.patch.object(TackerCommand, 'get_client')