-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
chore: Added tests for GetAdminUrlForLanguage template tag #8049
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…g create forms inside the admin language tabs
…if they are unpublished or archived
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is a good idea!
However, you'll need to avoid assumptions on the primary keys.
@fsbraun Yup, that's right. I added your suggestions in one commit & fixed a spelling issue. Should be fine now! Do you have any other suggestions? |
@filipweidemann What exactly is the difference between the two tests? Do we need them both? I can imagine two tests (based on either of yours).
With a partially filled cache by the two calls, the tests would fail. |
@fsbraun Yeah wow, I actually forgot the third case, you're right. Was thinking about this before implementing it. I'll add it as well! About the current ones: I can probably remove the first one and only stick with the "faked" template one. My idea was that we also check if it can be forced to craft the links according to our language but let's be real, it actually is not doing anything here because it uses Django's I'll remove the first one and replace it with the one you suggested because this one is actually missing right now! |
@fsbraun okay so I deleted the first one and added the method calls before rendering the template. I also verified that this catches the regression by temporarily adding This is cool. Anything else? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Looks good to me!! Thank you so much!
Co-authored-by: Fabian Braun <fsbraun@gmx.de>
Co-authored-by: Fabian Braun <fsbraun@gmx.de>
Description
This PR catches up on #8044 and adds two new tests targeting the regressed template tag
GetAdminUrlForLanguage
.I think this is worth it. Please let me know what you think.
Related resources
#8044
Checklist
develop-4