summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index cc65b9c..b859faa 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -1183,12 +1183,13 @@ class McqTestCase(TestCase):
class HookTestCase(TestCase):
- code = models.TextField()
+ hook_code = models.TextField()
weight = models.FloatField(default=1.0)
def get_field_value(self):
- return {"test_case_type": "hooktestcase", "code": self.code}
+ return {"test_case_type": "hooktestcase", "hook_code": self.hook_code,
+ "weight": self.weight}
def __str__(self):
- return u'Hook Testcase | Correct: {0}'.format(self.code)
+ return u'Hook Testcase | Correct: {0}'.format(self.hook_code)