-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Added false in save function to skip model validation #11642
Added false in save function to skip model validation #11642
Conversation
Manage this branch in SquashTest this branch here: https://jaivignesh-afkfixadded-false-i-f51v3.squash.io |
Hi @Jaivignesh-afk - thanks for the PR. |
I acknowledge my oversight, I will try to follow that next time. I will be adding the tests asap |
Could you please clarify where I should write these tests, like in test_page_model.py or test_edit_handlers.py or some other file? Additionally, what aspects should I focus on when writing tests? For example, should I ensure that model validation is skipped? |
The best way to approach tests is to ask: "what does this change allow an end-user to do, that they couldn't do before?" In this case, they will be able to use the 'Unlock' view in the admin to unlock a page with validation errors. So, we want a test that does the following:
Tests for the lock/unlock views can be found in wagtail/admin/tests/pages/test_page_locking.py. The test you add will be mostly the same as |
Ok, Thank you for the tips!! |
Fixes #9703
added clean = False to skip model validation during unlocking a page as mentioned by @prgood in #9703
Please check the following:
make lint
from the Wagtail root.Please describe additional details for testing this change.
Footnotes
Development Testing ↩
Browser and device support ↩
Accessibility Target ↩