From bfbf01f7c5477bede4404b1631b172c01891b38f Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Fri, 26 Apr 2024 15:58:35 +0300 Subject: [PATCH] Adjust tests to match an updated apostrophe character See: https://github.com/sehmaschine/django-grappelli/pull/1049 https://github.com/sehmaschine/django-grappelli/pull/1055 --- tcms/core/tests/test_admin.py | 5 ++--- tcms/kiwi_auth/tests/test_admin.py | 10 +++++----- tcms/management/tests/tests.py | 2 +- tcms/testplans/tests/test_admin.py | 2 +- tcms/testruns/tests/test_admin.py | 4 ++-- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/tcms/core/tests/test_admin.py b/tcms/core/tests/test_admin.py index 248fffd6de..07d8599666 100644 --- a/tcms/core/tests/test_admin.py +++ b/tcms/core/tests/test_admin.py @@ -145,7 +145,7 @@ 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, I’m sure")) def test_superuser_should_be_able_to_delete_any_user(self): self.client.login( # nosec:B106:hardcoded_password_funcarg @@ -153,9 +153,8 @@ def test_superuser_should_be_able_to_delete_any_user(self): ) 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, I’m sure")) response = self.client.post(self.url, {"post": "yes"}, follow=True) self.assertEqual(HTTPStatus.OK, response.status_code) self.assertNotContains( diff --git a/tcms/kiwi_auth/tests/test_admin.py b/tcms/kiwi_auth/tests/test_admin.py index bff6e626bb..cbf3bddb0c 100644 --- a/tcms/kiwi_auth/tests/test_admin.py +++ b/tcms/kiwi_auth/tests/test_admin.py @@ -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, I’m sure")) response = self.client.post( reverse("admin:auth_user_delete", args=[self.admin.pk]), @@ -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, I’m sure")) response = self.client.post( reverse("admin:auth_user_delete", args=[self.tester.pk]), @@ -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, I’m sure")) response = self.client.post( reverse("admin:auth_user_delete", args=[self.moderator.pk]), @@ -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, I’m sure")) response = self.client.post( reverse("admin:auth_user_delete", args=[self.tester.pk]), @@ -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, I’m sure")) response = self.client.post( reverse("admin:auth_user_delete", args=[self.tester.pk]), diff --git a/tcms/management/tests/tests.py b/tcms/management/tests/tests.py index ece90a4686..26076e8053 100644 --- a/tcms/management/tests/tests.py +++ b/tcms/management/tests/tests.py @@ -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, I’m sure")) # confirm that we're sure we want to delete it response = self.c.post(location, {"post": "yes"}) diff --git a/tcms/testplans/tests/test_admin.py b/tcms/testplans/tests/test_admin.py index 0548f17ae0..59bf9533f0 100755 --- a/tcms/testplans/tests/test_admin.py +++ b/tcms/testplans/tests/test_admin.py @@ -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, I’m sure")) response = self.client.post( reverse("admin:testplans_testplan_delete", args=[self.test_plan.pk]), {"post": "yes"}, diff --git a/tcms/testruns/tests/test_admin.py b/tcms/testruns/tests/test_admin.py index 6bb6b2a896..f10b9acaf9 100644 --- a/tcms/testruns/tests/test_admin.py +++ b/tcms/testruns/tests/test_admin.py @@ -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, I’m sure")) response = self.client.post( reverse("admin:testruns_testrun_delete", args=[self.test_run.pk]), {"post": "yes"}, @@ -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, I’m sure")) response = self.client.post( reverse( "admin:testruns_testexecutionstatus_delete", args=[exe_status.pk]