diff options
author | Palaparthy Adityachandra | 2020-03-17 15:06:18 +0530 |
---|---|---|
committer | GitHub | 2020-03-17 15:06:18 +0530 |
commit | 15ce39acb70056bdfb9820efa634d704a963cb84 (patch) | |
tree | b54a2d7493be2ba3e9249ae4412c9c231ffaef6b /yaksh/test_views.py | |
parent | a5e2fb409beebdc33fdb7c230dd50559509fd4c0 (diff) | |
parent | a2186d263aa8927a47fdb9f3a23ad39841b64b33 (diff) | |
download | online_test-15ce39acb70056bdfb9820efa634d704a963cb84.tar.gz online_test-15ce39acb70056bdfb9820efa634d704a963cb84.tar.bz2 online_test-15ce39acb70056bdfb9820efa634d704a963cb84.zip |
Merge pull request #660 from adityacp/fix_course_progress_download_csv
Add a button to download course progress in a CSV
Diffstat (limited to 'yaksh/test_views.py')
-rw-r--r-- | yaksh/test_views.py | 18 |
1 files changed, 18 insertions, 0 deletions
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 |