python-openstackclient/openstackclient/tests/unit/api
Imtiaz Chowdhury 1bd2bf67da Fixes image api URL endpoint for certain scenario
openstackclient fails to get image list when the image api endpoint
has 'v2' substring in the URL. Instead of checking whether the api
endpoint URL terminates with '/v2', the current logic is checking
whether 'v2' appears anywhere in the endpoint string.

This issue was discovered on a production setup where certain
server names had 'v2' in their names. For example, when a hostname
is gopher.dev20.com, the image list APIs fail.

This commit updates the unit test to reflect this scenario. Without
the change in openstackclient/api/image_v2.py, all the unit tests
fail.

Co-Authored-By: sergio.carvalho@workday.com
Change-Id: I26b85afd646938272dbabe8e045b337b7df58c7d
Closes-Bug: 1652827
2017-01-04 18:14:10 +00:00
..
__init__.py move unit tests to new "unit" test module 2016-09-08 15:19:50 -07:00
fakes.py move unit tests to new "unit" test module 2016-09-08 15:19:50 -07:00
test_api.py move unit tests to new "unit" test module 2016-09-08 15:19:50 -07:00
test_image_v1.py Fixes image api URL endpoint for certain scenario 2017-01-04 18:14:10 +00:00
test_image_v2.py Fixes image api URL endpoint for certain scenario 2017-01-04 18:14:10 +00:00
test_object_store_v1.py move unit tests to new "unit" test module 2016-09-08 15:19:50 -07:00
test_utils.py move unit tests to new "unit" test module 2016-09-08 15:19:50 -07:00