summaryrefslogtreecommitdiff
path: root/yaksh/test_views.py
diff options
context:
space:
mode:
authorankitjavalkar2020-05-27 21:52:07 +0530
committerGitHub2020-05-27 21:52:07 +0530
commit73dc8f6820c6c86fd8e70a68456ca2e541801bde (patch)
tree8b3399aace86cddc19818dece0040420acc49da5 /yaksh/test_views.py
parent372a7c56adaeabee374f9fd9268f1ebf0e082265 (diff)
parentb3b450f7c575f9cf8ed9a8b12e495f4be0adc143 (diff)
downloadonline_test-73dc8f6820c6c86fd8e70a68456ca2e541801bde.tar.gz
online_test-73dc8f6820c6c86fd8e70a68456ca2e541801bde.tar.bz2
online_test-73dc8f6820c6c86fd8e70a68456ca2e541801bde.zip
Merge pull request #715 from ankitjavalkar/fix-timer-bug
Check if attempts are allowed and spare time is available before answer is checked
Diffstat (limited to 'yaksh/test_views.py')
-rw-r--r--yaksh/test_views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/yaksh/test_views.py b/yaksh/test_views.py
index 24750e3..a7ccac2 100644
--- a/yaksh/test_views.py
+++ b/yaksh/test_views.py
@@ -5496,8 +5496,8 @@ class TestQuestionPaper(TestCase):
self.answerpaper = AnswerPaper.objects.create(
user=self.user, question_paper=self.question_paper,
attempt_number=1,
- start_time=datetime(2014, 10, 9, 10, 8, 15, 0, tzone),
- end_time=datetime(2014, 10, 9, 10, 15, 15, 0, tzone),
+ start_time=timezone.now() - timezone.timedelta(minutes = 10),
+ end_time=timezone.now() - timezone.timedelta(minutes = 1),
user_ip="127.0.0.1", status="inprogress", passed=False,
percent=0, marks_obtained=0, course=self.course
)