From 8664a766406d6acf0d6a1688948153c407ea27f2 Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Fri, 24 Apr 2015 14:25:26 +0530 Subject: Code Review: Code refactoring - Rename files - Create function for @classmethod call - Fix current, add new testcases - Fix views to fetch solution/ref_code_path fields in question post save - Fix errors --- testapp/exam/xmlrpc_clients.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'testapp/exam/xmlrpc_clients.py') diff --git a/testapp/exam/xmlrpc_clients.py b/testapp/exam/xmlrpc_clients.py index 5d95cae..8f5642e 100644 --- a/testapp/exam/xmlrpc_clients.py +++ b/testapp/exam/xmlrpc_clients.py @@ -22,7 +22,7 @@ class CodeServerProxy(object): pool_url = 'http://localhost:%d' % (SERVER_POOL_PORT) self.pool_server = ServerProxy(pool_url) - def run_code(self, info_parameter, language, user_dir): + def run_code(self, language, json_data, user_dir): """Tests given code (`answer`) with the `test_code` supplied. If the optional `in_dir` keyword argument is supplied it changes the directory to that directory (it does not change it back to the original when @@ -31,7 +31,7 @@ class CodeServerProxy(object): Parameters ---------- - info_parameter contains; + json_data contains; user_answer : str The user's answer for the question. test_code : str @@ -50,7 +50,7 @@ class CodeServerProxy(object): try: server = self._get_server() - result = server.check_code(info_parameter, language, user_dir) + result = server.check_code(language, json_data, user_dir) except ConnectionError: result = json.dumps({'success': False, 'error': 'Unable to connect to any code servers!'}) return result -- cgit