summaryrefslogtreecommitdiff
path: root/testapp/exam/xmlrpc_clients.py
diff options
context:
space:
mode:
authorankitjavalkar2015-04-24 14:25:26 +0530
committerankitjavalkar2015-04-26 21:11:52 +0530
commit8664a766406d6acf0d6a1688948153c407ea27f2 (patch)
tree7505ef02b5e36395fc7e92ff5cde7700f2025979 /testapp/exam/xmlrpc_clients.py
parent17752a69114e7dbad266337e768013920aec8c0c (diff)
downloadonline_test-8664a766406d6acf0d6a1688948153c407ea27f2.tar.gz
online_test-8664a766406d6acf0d6a1688948153c407ea27f2.tar.bz2
online_test-8664a766406d6acf0d6a1688948153c407ea27f2.zip
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
Diffstat (limited to 'testapp/exam/xmlrpc_clients.py')
-rw-r--r--testapp/exam/xmlrpc_clients.py6
1 files changed, 3 insertions, 3 deletions
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