From 83fe192987c239287bf816a31f4da31910eb7087 Mon Sep 17 00:00:00 2001 From: adityacp Date: Tue, 30 Aug 2016 22:44:46 +0530 Subject: changed load and dump test cases --- yaksh/test_models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'yaksh') 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)) -- cgit