diff options
author | Mahesh Gudi | 2016-12-29 18:00:28 +0530 |
---|---|---|
committer | maheshgudi | 2017-01-09 18:10:30 +0530 |
commit | 65f8f0f4dd867c1d1647712560e3aef73b8c921f (patch) | |
tree | 709bdb459847ed64cf59bb46d21018fba9f13f96 /yaksh/models.py | |
parent | 7fb288ffd992c912a8e2288aa97d6c6ceeedf1a1 (diff) | |
download | online_test-65f8f0f4dd867c1d1647712560e3aef73b8c921f.tar.gz online_test-65f8f0f4dd867c1d1647712560e3aef73b8c921f.tar.bz2 online_test-65f8f0f4dd867c1d1647712560e3aef73b8c921f.zip |
Python hook evaluator
Diffstat (limited to 'yaksh/models.py')
-rw-r--r-- | yaksh/models.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index d65970b..cc65b9c 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -1185,3 +1185,10 @@ class McqTestCase(TestCase): class HookTestCase(TestCase): code = models.TextField() weight = models.FloatField(default=1.0) + + def get_field_value(self): + return {"test_case_type": "hooktestcase", "code": self.code} + + def __str__(self): + return u'Hook Testcase | Correct: {0}'.format(self.code) + |