Esempio n. 1
0
 def test_rejects_address_with_incorrect_domain(self):
     with patch.object(settings, 'GOOGLE_APPS_DOMAIN', 'example.com'):
         self.assertFalse(validate_email('*****@*****.**'))
Esempio n. 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('*****@*****.**'))
Esempio n. 3
0
 def test_accept_any_address_when_domain_empty(self):
     with patch.object(settings, 'GOOGLE_APPS_DOMAIN', None):
         self.assertTrue(validate_email('*****@*****.**'))
Esempio n. 4
0
 def test_accepts_address_with_correct_domain(self):
     with patch.object(settings, 'GOOGLE_APPS_DOMAIN', 'example.com'):
         self.assertTrue(validate_email('*****@*****.**'))