summaryrefslogtreecommitdiff
path: root/yaksh/test_models.py
diff options
context:
space:
mode:
authorankitjavalkar2016-11-04 19:20:20 +0530
committerankitjavalkar2016-11-10 12:43:14 +0530
commit4904a8305e7e83a00cef718a42bbbf8e7d5f8740 (patch)
tree43d9ffee43fcc0621633d7eb6406f03808ea8689 /yaksh/test_models.py
parent576c92b3b7d8989bf6bb99316d096f48f5b4cc24 (diff)
downloadonline_test-4904a8305e7e83a00cef718a42bbbf8e7d5f8740.tar.gz
online_test-4904a8305e7e83a00cef718a42bbbf8e7d5f8740.tar.bz2
online_test-4904a8305e7e83a00cef718a42bbbf8e7d5f8740.zip
Add partial grade mark for stdio test case and fix model test cases
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..50d39c1 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",
+ "marks": 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",
+ "marks": 0.0
+ }
]
}
self.answer_data_json = json.dumps(answer_data)