Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
test: Contest urls test case
Browse files Browse the repository at this point in the history
  • Loading branch information
LuizaMaluf committed Nov 4, 2023
1 parent 4dfdd5f commit 7ab68db
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/contests/tests_contests.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from apps.contests.admin import ContestAdmin, ContestModelForm
from apps.contests.enums import ContestStatus
from apps.contests.models import Contest
from apps.contests.views import DetailView


class ContestTestCase(TestCase):
Expand Down Expand Up @@ -101,5 +100,7 @@ def test_fieldsets(self) -> None:
class TestContestsUrls(TestCase):
def test_detail_url_resolves(self) -> None:
url = reverse("contests:detail", args=[1])
resolve_match = resolve(url)
self.assertEqual(resolve_match.func, DetailView)
resolved_view_name = resolve(url).view_name
expected_view_name = "contests:detail"

self.assertEqual(resolved_view_name, expected_view_name)

0 comments on commit 7ab68db

Please sign in to comment.