summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradityacp2016-08-30 22:44:46 +0530
committeradityacp2016-08-30 22:44:46 +0530
commit83fe192987c239287bf816a31f4da31910eb7087 (patch)
tree423367fa28d9c96c27fab3bcbb3f11f941a0359e
parent4eb9778454dc5ecec99ccf951f012a69582b0ca3 (diff)
downloadonline_test-83fe192987c239287bf816a31f4da31910eb7087.tar.gz
online_test-83fe192987c239287bf816a31f4da31910eb7087.tar.bz2
online_test-83fe192987c239287bf816a31f4da31910eb7087.zip
changed load and dump test cases
-rw-r--r--yaksh/test_models.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/yaksh/test_models.py b/yaksh/test_models.py
index 5c34e8e..7b5dd5b 100644
--- a/yaksh/test_models.py
+++ b/yaksh/test_models.py
@@ -69,7 +69,7 @@ def tearDownModule():
shutil.rmtree(dir_path1)
shutil.rmtree(dir_path2)
shutil.rmtree(dir_path3)
- #shutil.rmtree(dir_path4)
+ shutil.rmtree(dir_path4)
###############################################################################
@@ -148,7 +148,7 @@ class QuestionTestCases(unittest.TestCase):
"language": "Python", "type": "Code",
"test_case_type": "standardtestcase",
"testcase": self.test_case_upload_data,
- "files": [file1],
+ "files": [[file1, 0]],
"summary": "Json Demo"}]
self.json_questions_data = json.dumps(questions_data)
@@ -191,7 +191,7 @@ class QuestionTestCases(unittest.TestCase):
self.assertTrue(self.question2.active)
self.assertEqual(self.question2.snippet, q['snippet'])
self.assertEqual(self.question2.test_case_type, q['test_case_type'])
- self.assertEqual(os.path.basename(que_file.file.path), q['files'][0])
+ self.assertEqual(os.path.basename(que_file.file.path), q['files'][0][0])
self.assertEqual([case.get_field_value() for case in test_case], q['testcase'])
for file in zip_file.namelist():
os.remove(os.path.join(tmp_path, file))