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

Commit

Permalink
test: Problem DetailView test case
Browse files Browse the repository at this point in the history
  • Loading branch information
LuizaMaluf committed Nov 6, 2023
1 parent 13b8d26 commit 62a80ff
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apps/problems/tests_problems.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,11 @@ def test_detail_url_reverse(self) -> None:
generated_url = reverse("problems:detail", args=[int])

self.assertEqual(generated_url, expected_url)


class DetailViewTestCase(TestCase):
def test_detail_view_model_is_problem(self) -> None:
self.assertEqual(DetailView.model, Problem)

def test_detail_view_template_name_is_correct(self) -> None:
self.assertEqual(DetailView.template_name, "problems/detail.html")

0 comments on commit 62a80ff

Please sign in to comment.