Hi there,

I'm wonder, how do we create a verified user for testing purpose

I have this line that creates a user

*cls.user = get_user_model().objects.create_user(username='testuser', 
email='testu...@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': 
'testu...@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

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/128591dc-b8c0-4f78-af86-faf7a42f3f0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to