From 485c9edcd2e1115ec1f51e6d129d47058537f2b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20L=2E=20=E2=9C=94?= <97265556+LopesLs@users.noreply.github.com> Date: Sat, 3 Feb 2024 17:43:08 -0300 Subject: [PATCH] fix(tests): Remove deprecated method --- flashcard/tests/test_models.py | 2 +- website/tests/test_views.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flashcard/tests/test_models.py b/flashcard/tests/test_models.py index a2fe15c..7538f90 100644 --- a/flashcard/tests/test_models.py +++ b/flashcard/tests/test_models.py @@ -12,7 +12,7 @@ def setUpTestData(cls): def test_nome_label(self): categoria = Categoria.objects.get(id=1) field_label = categoria._meta.get_field("nome").verbose_name - self.assertEquals(field_label, "nome") + self.assertEqual(field_label, "nome") def test_instance_creation(self): category = Categoria.objects.get(id=1) diff --git a/website/tests/test_views.py b/website/tests/test_views.py index ab4ae6c..78f3f42 100644 --- a/website/tests/test_views.py +++ b/website/tests/test_views.py @@ -19,7 +19,7 @@ def test_instance_creation(self): def test_login_works_properly(self): response = self.client.get("/") - self.assertEquals(response.context["user"].username, "testuser") + self.assertEqual(response.context["user"].username, "testuser") def test_redirect_if_not_logged_in(self): self.client.logout() @@ -29,9 +29,9 @@ def test_redirect_if_not_logged_in(self): def test_home_page_url_exists(self): response = self.client.get("/") - self.assertEquals(response.status_code, 200) + self.assertEqual(response.status_code, 200) def test_home_page_url_accessible_by_name(self): response = self.client.get(reverse_lazy("home")) - self.assertEquals(response.status_code, 200) + self.assertEqual(response.status_code, 200)