Пример #1
0
 def test_EditUserForm_validates_if_email_unchanged(self):
     email = '*****@*****.**' % factory.getRandomString()
     user = factory.make_user(email=email)
     form = EditUserForm(
         instance=user,
         data={
             'email': email,
             'username': factory.getRandomString(),
         })
     self.assertTrue(form.is_valid())
Пример #2
0
 def test_EditUserForm_validates_if_email_unchanged(self):
     email = '*****@*****.**' % factory.make_string()
     user = factory.make_User(email=email)
     form = EditUserForm(
         instance=user,
         data={
             'email': email,
             'username': factory.make_string(),
         })
     self.assertTrue(form.is_valid())
Пример #3
0
 def test_EditUserForm_validates_if_email_unchanged(self):
     email = "*****@*****.**" % factory.make_string()
     user = factory.make_User(email=email)
     form = EditUserForm(
         instance=user,
         data={
             "email": email,
             "username": factory.make_string()
         },
     )
     self.assertTrue(form.is_valid())