diff --git a/CHANGELOG.md b/CHANGELOG.md index 80dfc6b..7c2549c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Changed ### Fixed - Upgrade python version in example environment and resolve build issues +- Replace deprecated assertEquals with assertEqual ### Removed - Drop EOL Python 3.7 support (@marteinn) diff --git a/tests/test_managers.py b/tests/test_managers.py index 755dfea..6545cc9 100644 --- a/tests/test_managers.py +++ b/tests/test_managers.py @@ -27,26 +27,26 @@ def test_manager(self): sub_sub_page = TestPage(title="sub_sub_page") sub_page.add_child(instance=sub_sub_page) - self.assertEquals(TestPage.objects.count(), 3) - self.assertEquals(TestPage.objects_excluding_bins.count(), 3) + self.assertEqual(TestPage.objects.count(), 3) + self.assertEqual(TestPage.objects_excluding_bins.count(), 3) with self.register_hook("before_delete_page", trash_delete): delete_url = reverse("wagtailadmin_pages:delete", args=(sub_sub_page.id,)) self.client.post(delete_url) - self.assertEquals(TestPage.objects.count(), 3) - self.assertEquals(TestPage.objects_excluding_bins.count(), 2) + self.assertEqual(TestPage.objects.count(), 3) + self.assertEqual(TestPage.objects_excluding_bins.count(), 2) with self.register_hook("register_admin_urls", urlconf_time): restore_url = reverse("wagtail_trash_restore", args=(sub_sub_page.id,)) self.client.get(restore_url) - self.assertEquals(TestPage.objects.count(), 3) - self.assertEquals(TestPage.objects_excluding_bins.count(), 3) + self.assertEqual(TestPage.objects.count(), 3) + self.assertEqual(TestPage.objects_excluding_bins.count(), 3) with self.register_hook("before_delete_page", trash_delete): delete_url = reverse("wagtailadmin_pages:delete", args=(top_page.id,)) self.client.post(delete_url) - self.assertEquals(TestPage.objects.count(), 3) - self.assertEquals(TestPage.objects_excluding_bins.count(), 0) + self.assertEqual(TestPage.objects.count(), 3) + self.assertEqual(TestPage.objects_excluding_bins.count(), 0) diff --git a/tests/test_permissions.py b/tests/test_permissions.py index 026bb82..5093421 100644 --- a/tests/test_permissions.py +++ b/tests/test_permissions.py @@ -68,7 +68,7 @@ class TestPermissions(TestCase, WagtailTestUtils): # resp = self.client.get(index_url) # html = str(resp.content) - # self.assertEquals(html.count("data-object-pk"), 0) + # self.assertEqual(html.count("data-object-pk"), 0) # with self.register_hook("before_delete_page", trash_delete): # delete_url = reverse("wagtailadmin_pages:delete", args=(self.top_page.id,)) @@ -78,4 +78,4 @@ class TestPermissions(TestCase, WagtailTestUtils): # html = str(resp.content) # print(html) - # self.assertEquals(html.count("data-object-pk"), 1) + # self.assertEqual(html.count("data-object-pk"), 1)