summaryrefslogtreecommitdiff
path: root/yaksh/test_models.py
diff options
context:
space:
mode:
authorprathamesh2016-11-17 13:58:51 +0530
committerprathamesh2016-11-17 13:58:51 +0530
commit93b16753ded5f3ef07187e9413c94bd52f2e77f7 (patch)
treef137a0fd2a3036c5a6e87d323d8d14ee3d480c0b /yaksh/test_models.py
parent6ac9e99453543e6a5533f5ab77c7db3c08cc0cf9 (diff)
parentaa6ed71496c4a36faed9b42104c8426345bdc2e3 (diff)
downloadonline_test-93b16753ded5f3ef07187e9413c94bd52f2e77f7.tar.gz
online_test-93b16753ded5f3ef07187e9413c94bd52f2e77f7.tar.bz2
online_test-93b16753ded5f3ef07187e9413c94bd52f2e77f7.zip
Merge branch 'master' of https://github.com/FOSSEE/online_test into student-interface
Resolved Conflicts: yaksh/templates/yaksh/question.html Added testarea back for now.
Diffstat (limited to 'yaksh/test_models.py')
-rw-r--r--yaksh/test_models.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/yaksh/test_models.py b/yaksh/test_models.py
index 019a339..e7f3016 100644
--- a/yaksh/test_models.py
+++ b/yaksh/test_models.py
@@ -141,7 +141,9 @@ class QuestionTestCases(unittest.TestCase):
)
self.upload_test_case.save()
self.user_answer = "demo_answer"
- self.test_case_upload_data = [{"test_case": "assert fact(3)==6"}]
+ self.test_case_upload_data = [{"test_case": "assert fact(3)==6",
+ "weight": 0.0
+ }]
questions_data = [{"snippet": "def fact()", "active": True,
"points": 1.0,
"description": "factorial of a no",
@@ -877,7 +879,9 @@ class TestCaseTestCases(unittest.TestCase):
self.stdout_based_testcase.save()
answer_data = {"user_answer": "demo_answer",
"test_case_data": [
- {"test_case": "assert myfunc(12, 13) == 15"}
+ {"test_case": "assert myfunc(12, 13) == 15",
+ "weight": 0.0
+ }
]
}
self.answer_data_json = json.dumps(answer_data)