def test_invalid_email(self):
     form = EmailForm({'id': uuid4(), 'email': 'not-email'})
     self.assertFalse(form.is_valid())
 def test_invalid_id_not_uuid4(self):
     form = EmailForm({'id': 'not-uuid', 'email': '*****@*****.**'})
     self.assertFalse(form.is_valid())
 def test_id_and_email_required(self):
     form = EmailForm({})
     self.assertFalse(form.is_valid())
 def test_valid_fields(self):
     form = EmailForm({'id': uuid4(), 'email': '*****@*****.**'})
     self.assertTrue(form.is_valid())
 def test_invalid_email(self):
     form = EmailForm({'id': uuid4(), 'email': 'not-email'})