From 9dacf7cf2a26fb0f954f6f06cfffb65e23809ab7 Mon Sep 17 00:00:00 2001 From: adityacp Date: Mon, 9 Mar 2020 18:47:06 +0530 Subject: Add tests to check download course progress --- yaksh/test_views.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/yaksh/test_views.py b/yaksh/test_views.py index 58c6633..1c7c150 100644 --- a/yaksh/test_views.py +++ b/yaksh/test_views.py @@ -4211,6 +4211,24 @@ class TestDownloadCsv(TestCase): self.assertEqual(response.get('Content-Disposition'), 'attachment; filename="{0}"'.format(file_name)) + def test_download_course_progress_csv(self): + """ + Check for csv result of a course progress + """ + self.client.login( + username=self.user.username, + password=self.user_plaintext_pass + ) + response = self.client.get( + reverse('yaksh:download_course_progress', + kwargs={'course_id': self.course.id}), + follow=True + ) + file_name = "{0}.csv".format(self.course.name.lower().replace(" ", "_")) + self.assertEqual(response.status_code, 200) + self.assertEqual(response.get('Content-Disposition'), + 'attachment; filename="{0}"'.format(file_name)) + def test_download_quiz_csv(self): """ Check for csv result of a quiz -- cgit