diff --git a/zerver/lib/test_classes.py b/zerver/lib/test_classes.py index b0779ed830..4f033fe0a5 100644 --- a/zerver/lib/test_classes.py +++ b/zerver/lib/test_classes.py @@ -370,7 +370,7 @@ class ZulipTestCase(TestCase): self.assertIn(substring, response.content.decode('utf-8')) def assert_in_success_response(self, substrings, response): - # type: (Iterable[Text], HttpResponse) -> None + # type: (List[Text], HttpResponse) -> None self.assertEqual(response.status_code, 200) decoded = response.content.decode('utf-8') for substring in substrings: diff --git a/zerver/tests/test_email_change.py b/zerver/tests/test_email_change.py index 4aa6e348b4..d5e67e72be 100644 --- a/zerver/tests/test_email_change.py +++ b/zerver/tests/test_email_change.py @@ -31,7 +31,7 @@ class EmailChangeTestCase(ZulipTestCase): url = EmailChangeConfirmation.objects.get_activation_url( key, 'testserver') response = self.client_get(url) - self.assert_in_success_response("Whoops", response) + self.assert_in_success_response(["Whoops"], response) def test_confirm_email_change_with_invalid_key(self): # type: () -> None @@ -43,7 +43,7 @@ class EmailChangeTestCase(ZulipTestCase): url = EmailChangeConfirmation.objects.get_activation_url( key, 'testserver') response = self.client_get(url) - self.assert_in_success_response("Whoops", response) + self.assert_in_success_response(["Whoops"], response) def test_email_change_when_not_logging_in(self): # type: () -> None @@ -73,7 +73,7 @@ class EmailChangeTestCase(ZulipTestCase): confirmation_key=key) url = EmailChangeConfirmation.objects.get_activation_url(key) response = self.client_get(url) - self.assert_in_success_response("Whoops", response) + self.assert_in_success_response(["Whoops"], response) def test_confirm_email_change(self): # type: () -> None @@ -93,7 +93,7 @@ class EmailChangeTestCase(ZulipTestCase): response = self.client_get(url) self.assertEqual(response.status_code, 200) - self.assert_in_success_response("This confirms that the email address for your Zulip", + self.assert_in_success_response(["This confirms that the email address for your Zulip"], response) user_profile = get_user_profile_by_email(new_email) self.assertTrue(bool(user_profile)) @@ -115,7 +115,7 @@ class EmailChangeTestCase(ZulipTestCase): self.assertEqual(len(mail.outbox), 0) result = self.client_post(url, data) self.assertEqual(len(mail.outbox), 1) - self.assert_in_success_response('We have sent you an email', result) + self.assert_in_success_response(['We have sent you an email'], result) email_message = mail.outbox[0] self.assertEqual( email_message.subject, @@ -127,7 +127,7 @@ class EmailChangeTestCase(ZulipTestCase): activation_url = [s for s in body.split('\n') if s][4] response = self.client_get(activation_url) - self.assert_in_success_response("This confirms that the email address", + self.assert_in_success_response(["This confirms that the email address"], response) def test_unauthorized_email_change(self): @@ -153,7 +153,7 @@ class EmailChangeTestCase(ZulipTestCase): self.assertEqual(len(mail.outbox), 0) result = self.client_post(url, data) self.assertEqual(len(mail.outbox), 1) - self.assert_in_success_response('We have sent you an email', result) + self.assert_in_success_response(['We have sent you an email'], result) email_message = mail.outbox[0] self.assertEqual( email_message.subject, diff --git a/zerver/tests/test_signup.py b/zerver/tests/test_signup.py index a54d65f57c..7e09fcb1fb 100644 --- a/zerver/tests/test_signup.py +++ b/zerver/tests/test_signup.py @@ -972,7 +972,7 @@ class UserSignUpTest(ZulipTestCase): # Pick a password and agree to the ToS. result = self.submit_reg_form_for_user(email, password, full_name="") - self.assert_in_success_response("Invalid characters in name!", result) + self.assert_in_success_response(["Invalid characters in name!"], result) def test_unique_completely_open_domain(self): # type: () -> None