summaryrefslogtreecommitdiff
path: root/yaksh/test_views.py
diff options
context:
space:
mode:
authoradityacp2018-06-26 16:03:10 +0530
committeradityacp2018-06-26 16:03:10 +0530
commitddd2981529798b8c59dec33e50ccf6e808f3bc19 (patch)
tree946b2bf9b4eee1c82188cd438e3342e2fb2cc900 /yaksh/test_views.py
parenta200623e1739cb85c5125b0c5115663489e51633 (diff)
downloadonline_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.py4
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)