Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
longhotsummer committed Aug 30, 2024
1 parent 031dfa2 commit 52f81e7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions peachjam/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def test_legislation_listing(self):
documents,
)
self.assertEqual(
["1969", "2005", "2010", "2020"],
[("1969", 1969), ("2005", 2005), ("2010", 2010), ("2020", 2020)],
sorted(response.context["facet_data"]["years"]["options"]),
)

Expand All @@ -127,7 +127,10 @@ def test_legal_instrument_listing(self):
"African Charter on Democracy, Elections and Governance",
documents,
)
self.assertEqual(response.context["facet_data"]["years"]["options"], ["2007"])
self.assertEqual(
[("2007", 2007)],
response.context["facet_data"]["years"]["options"],
)

def test_legal_instrument_detail(self):
response = self.client.get(
Expand All @@ -151,7 +154,10 @@ def test_generic_document_listing(self):
"Activity Report of the Pan-African Parliament, July 2016 to June 2017",
documents,
)
self.assertEqual(response.context["facet_data"]["years"]["options"], ["2017"])
self.assertEqual(
[("2017", 2017)],
response.context["facet_data"]["years"]["options"],
)

def test_generic_document_detail(self):
response = self.client.get(
Expand Down

0 comments on commit 52f81e7

Please sign in to comment.