Skip to content

Commit

Permalink
Add unit tests #1524
Browse files Browse the repository at this point in the history
Signed-off-by: tdruez <[email protected]>
  • Loading branch information
tdruez committed Jan 10, 2025
1 parent eeb63b2 commit c6d37d7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scanpipe/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,16 @@ def test_scanpipe_views_project_actions_view(self):
)
self.assertContains(response, expected, html=True)

def test_scanpipe_views_project_action_report_view(self):
url = reverse("project_action")
data = {
"action": "report",
"selected_ids": f"{self.project1.uuid}",
"model_name": "todos",
}
response = self.client.post(url, data=data, follow=True)
self.assertEqual("report.xlsx", response.filename)

def test_scanpipe_views_project_details_is_archived(self):
url = self.project1.get_absolute_url()
expected1 = "WARNING: This project is archived and read-only."
Expand Down

0 comments on commit c6d37d7

Please sign in to comment.