Set validated=1 when creating user in test

This commit is contained in:
PCoder 2017-11-25 19:23:18 +01:00
parent 1dc5bb9bc8
commit ff43e748af

View file

@ -6,15 +6,13 @@ from .forms import HostingUserLoginForm, HostingUserSignupForm
class HostingUserLoginFormTest(TestCase):
def setUp(self):
password = 'user_password'
self.user = mommy.make('CustomUser')
self.user = mommy.make('CustomUser', validated=1)
self.user.set_password(password)
self.user.save()
self.completed_data = {
'email': self.user.email,
'password': password
}
self.incorrect_data = {
'email': 'test',
}