Beispiel #1
0
 def test_case_insensitive_email_already_in_use(self):
     form = SignupForm(data={'email': '*****@*****.**'})
     self.assertFalse(form.is_valid())
     self.assertIn('email', form.errors)
     self.assertEqual(len(form.errors['email']), 1)
     self.assertIn('This email address is already in use.',
                   form.errors['email'][0])
Beispiel #2
0
 def test_case_insensitive_email_already_in_use(self):
     form = SignupForm(data={"email": "*****@*****.**"})
     self.assertFalse(form.is_valid())
     self.assertIn("email", form.errors)
     self.assertEqual(len(form.errors["email"]), 1)
     self.assertIn("This email address is already in use.",
                   form.errors["email"][0])
Beispiel #3
0
 def test_submit_invalid_email(self):
     form = SignupForm(data={'email': '*****@*****.**'})
     self.assertFalse(form.is_valid())
     self.assertIn('email', form.errors)
     self.assertEqual(
         form.errors['email'],
         ['<p>This address does not end in <code>@example.org</code>.</p>'])
Beispiel #4
0
 def test_submit_invalid_email(self):
     form = SignupForm(data={"email": "*****@*****.**"})
     self.assertFalse(form.is_valid())
     self.assertIn("email", form.errors)
     self.assertEqual(
         form.errors["email"],
         ["<p>This address does not end in <code>@example.org</code>.</p>"])
Beispiel #5
0
 def test_submit_invalid_email(self):
     form = SignupForm(data={"email": "*****@*****.**"})
     self.assertFalse(form.is_valid())
     self.assertIn("email", form.errors)
     self.assertEqual(form.errors["email"], [
         "<p>This address does not end in <code>@example.org</code>.</p>"
     ])
Beispiel #6
0
 def test_case_insensitive_user_already_exists(self):
     form = SignupForm(data={'username': '******'})
     self.assertFalse(form.is_valid())
     self.assertIn('username', form.errors)
     self.assertEqual(form.errors['username'],
                      ['A user with that username already exists.'])
Beispiel #7
0
 def test_case_insensitive_user_already_exists(self):
     form = SignupForm(data={"username": "******"})
     self.assertFalse(form.is_valid())
     self.assertIn("username", form.errors)
     self.assertEqual(form.errors["username"],
                      ["A user with that username already exists."])
Beispiel #8
0
 def test_case_insensitive_user_already_exists(self):
     form = SignupForm(data={"username": "******"})
     self.assertFalse(form.is_valid())
     self.assertIn("username", form.errors)
     self.assertEqual(form.errors["username"], ["A user with that username already exists."])
Beispiel #9
0
 def test_case_insensitive_email_already_in_use(self):
     form = SignupForm(data={"email": "*****@*****.**"})
     self.assertFalse(form.is_valid())
     self.assertIn("email", form.errors)
     self.assertEqual(len(form.errors["email"]), 1)
     self.assertIn("This email address is already in use.", form.errors["email"][0])