diff options
author | adityacp | 2020-03-09 18:47:06 +0530 |
---|---|---|
committer | adityacp | 2020-03-09 18:47:06 +0530 |
commit | 9dacf7cf2a26fb0f954f6f06cfffb65e23809ab7 (patch) | |
tree | b051ae88e0ebfaef6e51f24580e233af157ca5a1 | |
parent | 81667305df2bc148e4ca6247ad3b2d12b30e660c (diff) | |
download | online_test-9dacf7cf2a26fb0f954f6f06cfffb65e23809ab7.tar.gz online_test-9dacf7cf2a26fb0f954f6f06cfffb65e23809ab7.tar.bz2 online_test-9dacf7cf2a26fb0f954f6f06cfffb65e23809ab7.zip |
Add tests to check download course progress
-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 |