mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-08-08 19:28:29 +02:00
Return client error status code for invalid form submissions (#849)
* Returns client error status code for invalid form submissions * fix flaky test
This commit is contained in:
@@ -43,6 +43,7 @@ class PasswordChangeViewTestCase(TestCase, BookmarkFactoryMixin):
|
||||
|
||||
response = self.client.post(reverse("change_password"), form_data)
|
||||
|
||||
self.assertEqual(response.status_code, 422)
|
||||
self.assertIn("old_password", response.context_data["form"].errors)
|
||||
|
||||
def test_should_return_error_for_mismatching_new_password(self):
|
||||
@@ -54,4 +55,5 @@ class PasswordChangeViewTestCase(TestCase, BookmarkFactoryMixin):
|
||||
|
||||
response = self.client.post(reverse("change_password"), form_data)
|
||||
|
||||
self.assertEqual(response.status_code, 422)
|
||||
self.assertIn("new_password2", response.context_data["form"].errors)
|
||||
|
Reference in New Issue
Block a user