From 65f8f0f4dd867c1d1647712560e3aef73b8c921f Mon Sep 17 00:00:00 2001 From: Mahesh Gudi Date: Thu, 29 Dec 2016 18:00:28 +0530 Subject: Python hook evaluator --- yaksh/models.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'yaksh/models.py') 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) + -- cgit