Traceback (most recent call last):
File "openstackclient/tests/volume/test_find_resource.py", line 65, in test_find
result = utils.find_resource(self.manager, NAME)
File "openstackclient/common/utils.py", line 62, in find_resource
raise exceptions.CommandError(msg)
CommandError: No snapshot with a name or ID of 'PhilSpector' exists.
======================================================================
FAIL: openstackclient.tests.volume.test_find_resource.TestFindResourceVolumes.test_find
tags: worker-3
----------------------------------------------------------------------
Empty attachments:
stderr
stdout
Traceback (most recent call last):
File "openstackclient/tests/volume/test_find_resource.py", line 43, in test_find
result = utils.find_resource(self.manager, NAME)
File "openstackclient/common/utils.py", line 62, in find_resource
raise exceptions.CommandError(msg)
CommandError: No volume with a name or ID of 'PhilSpector' exists.
======================================================================
tox -e py27 openstackclient .tests. volume. test_find_ resource
======= ======= ======= ======= ======= ======= ======= ======= ======= ======= .tests. volume. test_find_ resource. TestFindResourc eVolumeSnapshot s.test_ find ------- ------- ------- ------- ------- ------- ------- ------- -------
FAIL: openstackclient
tags: worker-3
-------
Empty attachments:
stderr
stdout
Traceback (most recent call last): t/tests/ volume/ test_find_ resource. py", line 65, in test_find resource( self.manager, NAME) t/common/ utils.py" , line 62, in find_resource CommandError( msg) ======= ======= ======= ======= ======= ======= ======= ======= ======= .tests. volume. test_find_ resource. TestFindResourc eVolumes. test_find ------- ------- ------- ------- ------- ------- ------- ------- -------
File "openstackclien
result = utils.find_
File "openstackclien
raise exceptions.
CommandError: No snapshot with a name or ID of 'PhilSpector' exists.
=======
FAIL: openstackclient
tags: worker-3
-------
Empty attachments:
stderr
stdout
Traceback (most recent call last): t/tests/ volume/ test_find_ resource. py", line 43, in test_find resource( self.manager, NAME) t/common/ utils.py" , line 62, in find_resource CommandError( msg) ======= ======= ======= ======= ======= ======= ======= ======= =======
File "openstackclien
result = utils.find_
File "openstackclien
raise exceptions.
CommandError: No volume with a name or ID of 'PhilSpector' exists.
=======
Currently, we set 'NAME_ATTR' attribute for Volume and Snapshot class in https:/ /github. com/openstack/ python- openstackclient /blob/master/ openstackclient /volume/ client. py#L26. So, when we test test_find_resource singly the Volume Snapshot class do not have 'NAME_ATTR' attribute since we will not import volume.client. Then the test fails.
If I add 'from openstackclient .volume import client' in test_find_ resource. py, it works well!