diff options
author | adityacp | 2018-06-26 16:03:10 +0530 |
---|---|---|
committer | adityacp | 2018-06-26 16:03:10 +0530 |
commit | ddd2981529798b8c59dec33e50ccf6e808f3bc19 (patch) | |
tree | 946b2bf9b4eee1c82188cd438e3342e2fb2cc900 /yaksh/test_views.py | |
parent | a200623e1739cb85c5125b0c5115663489e51633 (diff) | |
download | online_test-ddd2981529798b8c59dec33e50ccf6e808f3bc19.tar.gz online_test-ddd2981529798b8c59dec33e50ccf6e808f3bc19.tar.bz2 online_test-ddd2981529798b8c59dec33e50ccf6e808f3bc19.zip |
Fix course download to support Python 2 and 3
Diffstat (limited to 'yaksh/test_views.py')
-rw-r--r-- | yaksh/test_views.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/yaksh/test_views.py b/yaksh/test_views.py index 41f0401..c1511c0 100644 --- a/yaksh/test_views.py +++ b/yaksh/test_views.py @@ -1743,6 +1743,10 @@ class TestCourses(TestCase): self.lesson = Lesson.objects.create( name="demo lesson", description="test description", creator=self.user1) + lesson_file = SimpleUploadedFile("file1.mp4", b"Test") + django_file = File(lesson_file) + self.lesson.video_file.save(lesson_file.name, django_file, + save=True) self.lesson_unit = LearningUnit.objects.create( order=1, type="lesson", lesson=self.lesson) |