Remove the AppUser test model inheriting from OIDCUser as this is not
how the model should be used (composition should be preferred).
Update tests accordingly.
Differential D5331
tests: Simplify OIDCUser tests anlambert on Mar 25 2021, 12:06 PM. Authored by
Details
Remove the AppUser test model inheriting from OIDCUser as this is not Update tests accordingly.
Diff Detail
Event TimelineComment Actions Build is green Patch application report for D5331 (id=19113)Rebasing onto 13a56100ba... Current branch diff-target is up to date. Changes applied before testcommit e88e971d835d352d1d58612d4b9e0d0d15dde16a Author: Antoine Lambert <antoine.lambert@inria.fr> Date: Thu Mar 25 12:03:33 2021 +0100 tests: Simplify OIDCUser tests Remove the AppUser test model inheriting from OIDCUser as this is not how the model should be used (composition should be preferred). Update tests accordingly. See https://jenkins.softwareheritage.org/job/DAUTH/job/tests-on-diff/51/ for more details. Comment Actions
/me coughs Thanks. But maybe we could demonstrate how to use composition in those tests instead of dropping the model? Comment Actions In fact, that user model should not be composed with another user model. The incoming auth backends will create an instance of the OIDCUser model and associate it to Proper way to persist data associated to a remote user should be to create a django model I will rephrase the commit message then. Comment Actions Build is green Patch application report for D5331 (id=19119)Rebasing onto 13a56100ba... Current branch diff-target is up to date. Changes applied before testcommit b1e0415698f086670661cce8f94126128c0ecdfd Author: Antoine Lambert <antoine.lambert@inria.fr> Date: Thu Mar 25 12:03:33 2021 +0100 tests: Simplify OIDCUser tests Remove the AppUser test model inheriting from OIDCUser. Storing data related to a remote user should be done with a dedicated django model containing a user identifier column. Update tests accordingly. See https://jenkins.softwareheritage.org/job/DAUTH/job/tests-on-diff/52/ for more details. |