summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
authoradityacp2016-06-02 14:24:57 +0530
committeradityacp2016-07-27 22:52:23 +0530
commitf5ea9ecf903360c2860293639d1c6ba7a78b2339 (patch)
tree05d7b2c516851874d82b1c14efdd52b5945316fc /yaksh/models.py
parent344e1e804cee214c0d0f5c41ca16d871e786d4c3 (diff)
downloadonline_test-f5ea9ecf903360c2860293639d1c6ba7a78b2339.tar.gz
online_test-f5ea9ecf903360c2860293639d1c6ba7a78b2339.tar.bz2
online_test-f5ea9ecf903360c2860293639d1c6ba7a78b2339.zip
c,cpp,java evaluators with test cases
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 4ee6141..e7ae52f 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -36,7 +36,7 @@ enrollment_methods = (
test_case_types = (
("standardtestcase", "Standard Testcase"),
- ("stdoutbasedtestcase", "Stdout Based Testcase"),
+ ("stdiobasedtestcase", "StdIO Based Testcase"),
("mcqtestcase", "MCQ Testcase"),
)
@@ -888,15 +888,17 @@ class StandardTestCase(TestCase):
)
-class StdoutBasedTestCase(TestCase):
+class StdIOBasedTestCase(TestCase):
+ expected_input = models.TextField(blank=True)
expected_output = models.TextField(blank=True)
def get_field_value(self):
- return {"expected_output": self.expected_output}
+ return {"expected_output": self.expected_output,
+ "expected_input": self.expected_input}
def __unicode__(self):
- return u'Question: {0} | Exp. Output: {1}'.format(self.question,
- self.expected_output
+ return u'Question: {0} | Exp. Output: {1} | Exp. Input: {2}'.format(self.question,
+ self.expected_output, self.expected_input
)