horizon/openstack_auth
Akihiro Motoki 4046ef6616 Recover scenario settings in openstack_auth test_auth
The scenario configuration in openstack_auth test_auth was ignored
somehow. Perhaps it happened when openstack_auth was merged into
the horizon repo as test runners used in the horizon repo so far
(django test runner, nose and pytest) do not support testscenarios.

This commit tries to recover the original intention of the scenario.
pytest supports several ways to parametrize tests [1]
but there seems no way without changing each test functions.
A quick port of "testscenarios" is explained [2],
but it is just a way to generate tests based on scenarios and
we still need to add scenario parameters to each test function,
so we cannot refer scenario parameters in setUp().
As a result, I chose a way to inherit the original class and
pass different attributes per scenario.
This is not ideal and I hope pytest lovers can improve the situation.

The test classes in test_auth are renamed to more meaningful ones.

Direct overrides of settings in test_auth.py are improved too.

[1] https://docs.pytest.org/en/stable/example/parametrize.html
[2] https://docs.pytest.org/en/stable/example/parametrize.html#a-quick-port-of-testscenarios

Change-Id: I1538ffbc853a2c9328c364f462a27be36c85cc2f
2020-10-27 19:58:07 +09:00
..
locale Imported Translations from Zanata 2020-10-19 06:47:22 +00:00
plugin pylint: Address no-else-return warning 2020-09-27 12:44:16 +09:00
tests Recover scenario settings in openstack_auth test_auth 2020-10-27 19:58:07 +09:00
__init__.py Add Django OpenStack Auth to Horizon 2017-09-27 12:06:57 +01:00
backend.py pylint: Fix unnecessary-comprehension warning 2020-09-27 12:44:16 +09:00
defaults.py Changed default identity url to horizon 2019-12-06 18:41:38 +08:00
exceptions.py Automatically redirect to the password change when it's expired 2019-09-16 12:45:23 +02:00
forms.py Use python3-style super() 2020-10-15 14:37:20 +09:00
middleware.py Fix django.contrib.auth.middleware monkey patching 2018-11-06 21:36:45 +00:00
models.py Add Django OpenStack Auth to Horizon 2017-09-27 12:06:57 +01:00
policy.py Merge "Handle Permission Denied for policy files" 2019-09-26 18:39:54 +00:00
urls.py Remove Keystone v2 related code 2020-04-23 11:43:12 +09:00
user.py Remove Keystone v2 related code 2020-04-23 11:43:12 +09:00
utils.py pylint: Address no-else-return warning 2020-09-27 12:44:16 +09:00
views.py Merge "pylint: Address no-else-return warning" 2020-10-26 11:15:25 +00:00