Exemple #1
0
 def test_rejects_address_with_incorrect_domain(self):
     with patch.object(settings, 'GOOGLE_APPS_DOMAIN', 'example.com'):
         self.assertFalse(validate_email('*****@*****.**'))
Exemple #2
0
 def test_accepts_address_from_exception_list(self):
     with patch.multiple(settings, GOOGLE_APPS_DOMAIN='example.com', ALLOWED_EXTERNAL_USERS=['*****@*****.**']):
         self.assertTrue(validate_email('*****@*****.**'))
Exemple #3
0
 def test_accept_any_address_when_domain_empty(self):
     with patch.object(settings, 'GOOGLE_APPS_DOMAIN', None):
         self.assertTrue(validate_email('*****@*****.**'))
Exemple #4
0
 def test_accepts_address_with_correct_domain(self):
     with patch.object(settings, 'GOOGLE_APPS_DOMAIN', 'example.com'):
         self.assertTrue(validate_email('*****@*****.**'))