summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
authorPrabhu Ramachandran2016-09-01 17:59:39 +0530
committerGitHub2016-09-01 17:59:39 +0530
commit01e08dd15b59ce353043d541c9be81592cda3fe0 (patch)
treeba1a9f7ffee92b79262b83fa9eb6eed303550f98 /yaksh/models.py
parent27e7a443ef132e04cc5aeece7a5bf34d0687f482 (diff)
parenta4b636508d572cbe00ae8d0336c7b30494bad4a6 (diff)
downloadonline_test-01e08dd15b59ce353043d541c9be81592cda3fe0.tar.gz
online_test-01e08dd15b59ce353043d541c9be81592cda3fe0.tar.bz2
online_test-01e08dd15b59ce353043d541c9be81592cda3fe0.zip
Merge pull request #105 from adityacp/stdin_stdout_evaluator
Stdin stdout evaluators
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 81926e6..0f801b8 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -38,7 +38,7 @@ enrollment_methods = (
test_case_types = (
("standardtestcase", "Standard Testcase"),
- ("stdoutbasedtestcase", "Stdout Based Testcase"),
+ ("stdiobasedtestcase", "StdIO Based Testcase"),
("mcqtestcase", "MCQ Testcase"),
)
@@ -930,15 +930,17 @@ class StandardTestCase(TestCase):
)
-class StdoutBasedTestCase(TestCase):
- expected_output = models.TextField(blank=True)
+class StdioBasedTestCase(TestCase):
+ expected_input = models.TextField(blank=True)
+ expected_output = models.TextField()
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
)