Let's start to apply recommended guidelines when writing tests.
See "Don't give mock/stubs/fakes special names" section.
Paths
| Differential D5335 Authored by anlambert on Mar 25 2021, 1:58 PM.
Details
Summary Let's start to apply recommended guidelines when writing tests. See "Don't give mock/stubs/fakes special names" section.
Diff Detail
Event TimelineHerald added a reviewer: Reviewers. · View Herald TranscriptMar 25 2021, 1:58 PM2021-03-25 13:58:30 (UTC+1) Comment Actions Build is green Patch application report for D5335 (id=19128)Rebasing onto b1e0415698... Current branch diff-target is up to date. Changes applied before testcommit dc33050a245e1d0d78383752fb0827d352f21625 Author: Antoine Lambert <antoine.lambert@inria.fr> Date: Thu Mar 25 13:52:00 2021 +0100 tests: Rename keycloak_mock fixture to keycloak_oidc Let's start to apply recommended guidelines when writing tests. See https://jenkins.softwareheritage.org/job/DAUTH/job/tests-on-diff/53/ for more details. Harbormaster completed remote builds in B20213: Diff 19128.Mar 25 2021, 1:59 PM2021-03-25 13:59:20 (UTC+1) Comment Actions ok That will break deposit tests though (i gather you will deal with the webapp ones soon). Can we keep aliases on old names to avoid the temporary breakage? Comment Actions
Sure, will update the diff. Comment Actions Build is green Patch application report for D5335 (id=19131)Rebasing onto b1e0415698... Current branch diff-target is up to date. Changes applied before testcommit db5388d38a6a591d0d9d8bc35a440e13f62cac53 Author: Antoine Lambert <antoine.lambert@inria.fr> Date: Thu Mar 25 13:52:00 2021 +0100 tests: Rename keycloak_mock fixture to keycloak_oidc Let's start to apply recommended guidelines when writing tests. See https://jenkins.softwareheritage.org/job/DAUTH/job/tests-on-diff/54/ for more details. Harbormaster completed remote builds in B20216: Diff 19131.Mar 25 2021, 2:25 PM2021-03-25 14:25:34 (UTC+1) This revision is now accepted and ready to land.Mar 25 2021, 2:27 PM2021-03-25 14:27:47 (UTC+1) Closed by commit rDAUTHdb5388d38a6a: tests: Rename keycloak_mock fixture to keycloak_oidc (authored by anlambert). · Explain WhyMar 25 2021, 5:11 PM2021-03-25 17:11:10 (UTC+1) This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 19128 swh/auth/pytest_plugin.py
swh/auth/tests/conftest.py
swh/auth/tests/django/test_utils.py
swh/auth/tests/test_keycloak.py
|
I think it will be better to create a swh.auth.django.models module and put that model in it.
In a similar manner, authentication backends should be put in a swh.auth.django.backends (in an other diff of course).