test_signup: Add dnslookup patch for mirror_dummy_user registration test.

Fixes regression introduced in 326f9a85. The test indirectly makes a call to
email_is_not_mit_mailing_list, which then calls
DNS.dnslookup("%s.pobox.ns.athena.mit.edu" % username, DNS.Type.TXT).
This commit is contained in:
Rishi Gupta 2017-05-05 11:26:51 -07:00 committed by Tim Abbott
parent d3c05eaf42
commit 55a7aa4f9d
1 changed files with 3 additions and 2 deletions

View File

@ -1465,8 +1465,9 @@ class UserSignUpTest(ZulipTestCase):
mock_ldap.reset()
mock_initialize.stop()
def test_registration_email_for_mirror_dummy_user(self):
# type: () -> None
@patch('DNS.dnslookup', return_value=[['sipbtest:*:20922:101:Fred Sipb,,,:/mit/sipbtest:/bin/athena/tcsh']])
def test_registration_email_for_mirror_dummy_user(self, ignored):
# type: (Any) -> None
email = 'sipbtest@mit.edu'
user_profile = get_user_profile_by_email(email)