horizon/openstack_dashboard/test
Akihiro Motoki 5fd5b4c893 Fix version handling compatible with python-semanticversion 2.8
It seems the behavior of 'partial' argument of Version class __init__
has been changed between semantic-version 2.6.0 and 2.8.1
(though I could not identify the root cause).
'partial' argument is marked as deprecated in semantic-vesion 2.7.0,
so it is a good chance not to depend on 'partial' argument in horizon.

This commit uses Version.coerce() [1] instead to convert non-semver
version into a valid semver version.
We also need to keep the original version information as it is passed
when initializing python-*client (cinderclient and keystoneclient).

In addition, the previous implementation based on semantic-version 2.6.0
returns True for "Version("3.55") == 3". It depends on the behavior
of "partial" argument of semantic_version.Version. It was not
documented and it looks tricky to depend on this behavior.
"major" and "minor" properties are now introduced and api/cinder.py
is updated accordingly. I believe this approach is clearer and stable.

Unit test coverage on dict behavior is improved.
Variable names in the unit tests are adjusted to more meaningful ones.

[1] https://python-semanticversion.readthedocs.io/en/latest/#coercing-an-arbitrary-version-string

Change-Id: If0deee9d0289ff91d58d942b9612f7736356ae18
2019-09-09 15:54:26 +09:00
..
integration_tests Selenium tests fail when response is slow. 2019-08-09 10:44:50 +00:00
jasmine Remove unused jasmine_tests.py 2015-05-13 12:39:00 -06:00
selenium openstack_dashboard: Move test files to match module structure 2017-12-09 21:38:06 +09:00
templates Splits OpenStack Dashboard bits from framework app code. 2012-10-11 11:47:50 -07:00
test_data Fix listing security groups when no rules 2019-08-19 16:38:57 +09:00
test_panels Drop unnecessary executable flags 2017-12-27 21:32:48 +00:00
test_plugins Use default Django test runner instead of nose 2018-06-08 15:21:12 +03:00
unit Fix version handling compatible with python-semanticversion 2.8 2019-09-09 15:54:26 +09:00
__init__.py Revamp of testing machinery. 2012-04-23 22:24:21 -07:00
error_pages_urls.py hacking: noqa cleanup in openstack_dashboard 2017-03-17 19:38:47 +00:00
extensible_header_urls.py Drop unnecessary executable flags 2017-12-27 21:32:48 +00:00
helpers.py Define default settings explicitly (openstack_dashboard 5/5) 2019-07-08 18:20:32 +09:00
settings.py Define default settings explicitly (openstack_dashboard 5/5) 2019-07-08 18:20:32 +09:00
urls.py Fix Angular errors in openstack_auth 2018-03-17 18:36:01 +09:00