MCPcopy
hub / github.com/django/django / test_cleaned_data

Method test_cleaned_data

tests/auth_tests/test_forms.py:1241–1248  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1239 self.assertEqual(len(mail.outbox), 0)
1240
1241 def test_cleaned_data(self):
1242 user, username, email = self.create_dummy_user()
1243 data = {"email": email}
1244 form = PasswordResetForm(data)
1245 self.assertTrue(form.is_valid())
1246 form.save(domain_override="example.com")
1247 self.assertEqual(form.cleaned_data["email"], email)
1248 self.assertEmailMessageSent()
1249
1250 def test_custom_email_subject(self):
1251 data = {"email": "testclient@example.com"}

Callers

nothing calls this directly

Calls 5

create_dummy_userMethod · 0.95
saveMethod · 0.95
PasswordResetFormClass · 0.90
is_validMethod · 0.45

Tested by

no test coverage detected