cls.user = get_user_model().objects.create_user(username='testuser', email='test...@testing.com', password='password')
When I do a test of this for my custom login interface
def test_login_page_login_without_verification(self):
response = self.client.post(
reverse('account_login'),
{
'login': 'test...@docdoc.com',
'password': 'password',
}
)
self.assertRedirects(response, '/accounts/testuser/')
I keep getting the error that it redirects to /accounts/confirm-email/ (which is the verification page). I'm wondering, how can I make the user verified or create a verified user, so that I can test that a verified user will be redirected to the correct page after login.
Thanks.
Desmond