Skip to content

Commit

Permalink
Tests: Adjust to changed messages
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Jun 22, 2020
1 parent 68cb5fe commit 2ad1ad3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion weblate/accounts/tests/test_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def test_reset_paralel(self):
{"new_password1": "3pa$$word!", "new_password2": "3pa$$word!"},
follow=True,
)
self.assertContains(response, "Password reset has been already completed!")
self.assertContains(response, "Password reset has been already completed.")

def test_wrong_username(self):
data = REGISTRATION_DATA.copy()
Expand Down
4 changes: 2 additions & 2 deletions weblate/accounts/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ def test_contact_invalid(self):
def test_contact_rate(self):
"""Test for contact form rate limiting."""
response = self.client.post(reverse("contact"), CONTACT_DATA)
self.assertContains(response, "Too many messages sent, please try again later!")
self.assertContains(response, "Too many messages sent, please try again later.")

@override_settings(RATELIMIT_ATTEMPTS=1, RATELIMIT_WINDOW=0)
def test_contact_rate_window(self):
"""Test for contact form rate limiting."""
message = "Too many messages sent, please try again later!"
message = "Too many messages sent, please try again later."
response = self.client.post(reverse("contact"), CONTACT_DATA)
self.assertNotContains(response, message)
response = self.client.post(reverse("contact"), CONTACT_DATA)
Expand Down

0 comments on commit 2ad1ad3

Please sign in to comment.