mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-10 10:00:58 +00:00
Assert that an error message is present
This commit is contained in:
parent
2d90d0dbf2
commit
07e37af3eb
1 changed files with 2 additions and 0 deletions
|
|
@ -96,6 +96,8 @@ class TestUserCreateView(TestCase, WagtailTestUtils):
|
|||
self.assertEqual(response.status_code, 200)
|
||||
self.assertTemplateUsed(response, 'wagtailusers/users/create.html')
|
||||
|
||||
self.assertTrue(response.context['form'].errors['password2'])
|
||||
|
||||
# Check that the user was not created
|
||||
users = get_user_model().objects.filter(username='testuser')
|
||||
self.assertEqual(users.count(), 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue