diff options
author | Palaparthy Adityachandra | 2020-07-02 13:28:48 +0530 |
---|---|---|
committer | GitHub | 2020-07-02 13:28:48 +0530 |
commit | b541b3aa05bf19ed6d4d28373e186883e3c4e966 (patch) | |
tree | 2d0b95b53a60ce6830fcefe115830e89e940845a /yaksh/models.py | |
parent | c9e0d0df8dcb3a14017cef5ff01832a5345629db (diff) | |
parent | 46ef4a4a563b16bb96d09cb17496afb731e616ad (diff) | |
download | online_test-b541b3aa05bf19ed6d4d28373e186883e3c4e966.tar.gz online_test-b541b3aa05bf19ed6d4d28373e186883e3c4e966.tar.bz2 online_test-b541b3aa05bf19ed6d4d28373e186883e3c4e966.zip |
Merge pull request #719 from prathamesh920/hidden-testcases
Hide test cases
Diffstat (limited to 'yaksh/models.py')
-rw-r--r-- | yaksh/models.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index 7d4dd98..1b076a8 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -2534,11 +2534,13 @@ class StandardTestCase(TestCase): test_case = models.TextField() weight = models.FloatField(default=1.0) test_case_args = models.TextField(blank=True) + hidden = models.BooleanField(default=False) def get_field_value(self): return {"test_case_type": "standardtestcase", "test_case": self.test_case, "weight": self.weight, + "hidden": self.hidden, "test_case_args": self.test_case_args} def __str__(self): @@ -2549,11 +2551,13 @@ class StdIOBasedTestCase(TestCase): expected_input = models.TextField(default=None, blank=True, null=True) expected_output = models.TextField(default=None) weight = models.IntegerField(default=1.0) + hidden = models.BooleanField(default=False) def get_field_value(self): return {"test_case_type": "stdiobasedtestcase", "expected_output": self.expected_output, "expected_input": self.expected_input, + "hidden": self.hidden, "weight": self.weight} def __str__(self): @@ -2599,10 +2603,11 @@ class HookTestCase(TestCase): ) weight = models.FloatField(default=1.0) + hidden = models.BooleanField(default=False) def get_field_value(self): return {"test_case_type": "hooktestcase", "hook_code": self.hook_code, - "weight": self.weight} + "hidden": self.hidden, "weight": self.weight} def __str__(self): return u'Hook Testcase | Correct: {0}'.format(self.hook_code) |