Skip to content

Commit

Permalink
Adjust tests to match an updated apostrophe character
Browse files Browse the repository at this point in the history
  • Loading branch information
atodorov committed Apr 26, 2024
1 parent e6645a6 commit 35a5fb1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
5 changes: 2 additions & 3 deletions tcms/core/tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,16 @@ def test_regular_user_should_be_able_to_delete_himself(self):
response = self.client.get(self.url)

self.assertEqual(HTTPStatus.OK, response.status_code)
self.assertContains(response, _("Yes, I'm sure"))
self.assertContains(response, _("Yes, Im sure"))

def test_superuser_should_be_able_to_delete_any_user(self):
self.client.login( # nosec:B106:hardcoded_password_funcarg
username=self.superuser.username, password="password"
)
response = self.client.get(self.url)

# verify there's the Yes, I'm certain button
self.assertEqual(HTTPStatus.OK, response.status_code)
self.assertContains(response, _("Yes, I'm sure"))
self.assertContains(response, _("Yes, Im sure"))
response = self.client.post(self.url, {"post": "yes"}, follow=True)
self.assertEqual(HTTPStatus.OK, response.status_code)
self.assertNotContains(
Expand Down
10 changes: 5 additions & 5 deletions tcms/kiwi_auth/tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def test_superuser_can_delete_itself(self):
response = self.client.get(
reverse("admin:auth_user_delete", args=[self.admin.pk])
)
self.assertContains(response, _("Yes, I'm sure"))
self.assertContains(response, _("Yes, Im sure"))

response = self.client.post(
reverse("admin:auth_user_delete", args=[self.admin.pk]),
Expand All @@ -149,7 +149,7 @@ def test_superuser_can_delete_other_user(self):
response = self.client.get(
reverse("admin:auth_user_delete", args=[self.tester.pk])
)
self.assertContains(response, _("Yes, I'm sure"))
self.assertContains(response, _("Yes, Im sure"))

response = self.client.post(
reverse("admin:auth_user_delete", args=[self.tester.pk]),
Expand Down Expand Up @@ -337,7 +337,7 @@ def test_moderator_can_delete_itself(self):
response = self.client.get(
reverse("admin:auth_user_delete", args=[self.moderator.pk])
)
self.assertContains(response, _("Yes, I'm sure"))
self.assertContains(response, _("Yes, Im sure"))

response = self.client.post(
reverse("admin:auth_user_delete", args=[self.moderator.pk]),
Expand All @@ -357,7 +357,7 @@ def test_moderator_can_delete_other_user(self):
response = self.client.get(
reverse("admin:auth_user_delete", args=[self.tester.pk])
)
self.assertContains(response, _("Yes, I'm sure"))
self.assertContains(response, _("Yes, Im sure"))

response = self.client.post(
reverse("admin:auth_user_delete", args=[self.tester.pk]),
Expand Down Expand Up @@ -485,7 +485,7 @@ def test_regular_user_can_delete_myself(self):
response = self.client.get(
reverse("admin:auth_user_delete", args=[self.tester.pk])
)
self.assertContains(response, _("Yes, I'm sure"))
self.assertContains(response, _("Yes, Im sure"))

response = self.client.post(
reverse("admin:auth_user_delete", args=[self.tester.pk]),
Expand Down
2 changes: 1 addition & 1 deletion tcms/management/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def test_product_delete_with_test_plan_wo_email_settings(self):
location = reverse(admin_delete_url, args=[product.pk])
response = self.c.get(location)
self.assertContains(response, product.name)
self.assertContains(response, _("Yes, I'm sure"))
self.assertContains(response, _("Yes, Im sure"))

# confirm that we're sure we want to delete it
response = self.c.post(location, {"post": "yes"})
Expand Down
2 changes: 1 addition & 1 deletion tcms/testplans/tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_users_can_delete_testplan(self):
response = self.client.get(
reverse("admin:testplans_testplan_delete", args=[self.test_plan.pk])
)
self.assertContains(response, _("Yes, I'm sure"))
self.assertContains(response, _("Yes, Im sure"))
response = self.client.post(
reverse("admin:testplans_testplan_delete", args=[self.test_plan.pk]),
{"post": "yes"},
Expand Down
4 changes: 2 additions & 2 deletions tcms/testruns/tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_superuser_can_delete_testrun(self):
response = self.client.get(
reverse("admin:testruns_testrun_delete", args=[self.test_run.pk])
)
self.assertContains(response, _("Yes, I'm sure"))
self.assertContains(response, _("Yes, Im sure"))
response = self.client.post(
reverse("admin:testruns_testrun_delete", args=[self.test_run.pk]),
{"post": "yes"},
Expand Down Expand Up @@ -109,7 +109,7 @@ def test_test_execution_statuses_can_be_deleted_but_one_must_remain(
"admin:testruns_testexecutionstatus_delete", args=[exe_status.pk]
)
)
self.assertContains(response, _("Yes, I'm sure"))
self.assertContains(response, _("Yes, Im sure"))
response = self.client.post(
reverse(
"admin:testruns_testexecutionstatus_delete", args=[exe_status.pk]
Expand Down

0 comments on commit 35a5fb1

Please sign in to comment.