Skip to content

Commit

Permalink
use assertEquals for more descriptive error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
fekoch committed Oct 26, 2023
1 parent c1b9767 commit 49e048d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions evap/results/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,19 +472,19 @@ def test_default_view_is_public(self):
cache_results(self.evaluation)

page_without_get_parameter = self.app.get(self.url, user=self.manager)
self.assertTrue(page_without_get_parameter.context["view"] == "public")
self.assertEqual(page_without_get_parameter.context["view"], "public")

page_with_get_parameter = self.app.get(self.url + "?view=public", user=self.manager)
self.assertTrue(page_with_get_parameter.context["view"] == "public")
self.assertEqual(page_with_get_parameter.context["view"], "public")

page_with_random_get_parameter = self.app.get(self.url + "?view=asdf", user=self.manager)
self.assertTrue(page_with_random_get_parameter.context["view"] == "public")
self.assertEqual(page_with_random_get_parameter.context["view"], "public")

page_with_full_get_parameter = self.app.get(f"{self.url}?view=full", user=self.manager)
self.assertFalse(page_with_full_get_parameter.context["view"] == "public")
self.assertEqual(page_with_full_get_parameter.context["view"], "full")

page_with_export_get_parameter = self.app.get(f"{self.url}?view=export", user=self.manager)
self.assertFalse(page_with_export_get_parameter.context["view"] == "public")
self.assertEqual(page_with_export_get_parameter.context["view"], "export")

def test_wrong_state(self):
helper_exit_staff_mode(self)
Expand Down

0 comments on commit 49e048d

Please sign in to comment.