aboutsummaryrefslogtreecommitdiffstats
path: root/backend/routes/forms/unittesting.py
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2024-07-09 18:56:25 +0100
committerGravatar Chris Lovering <[email protected]>2024-07-09 19:01:28 +0100
commitae2d6ccac9d3c4d5181347e016660216212b3035 (patch)
treef58690867087ca26c45670d34d100a83e2233c47 /backend/routes/forms/unittesting.py
parentDocument timezone field in SCHEMA.md (diff)
Move unittest filtering to the Form.dict() function
Diffstat (limited to 'backend/routes/forms/unittesting.py')
-rw-r--r--backend/routes/forms/unittesting.py13
1 files changed, 0 insertions, 13 deletions
diff --git a/backend/routes/forms/unittesting.py b/backend/routes/forms/unittesting.py
index 3239d35..57c3a86 100644
--- a/backend/routes/forms/unittesting.py
+++ b/backend/routes/forms/unittesting.py
@@ -26,19 +26,6 @@ class UnittestResult(NamedTuple):
result: str
-def filter_unittests(form: Form) -> Form:
- """
- Replace the unittest data section of code questions with the number of test cases.
-
- This is used to redact the exact tests when sending the form back to the frontend.
- """
- for question in form.questions:
- if question.type == "code" and question.data["unittests"] is not None:
- question.data["unittests"]["tests"] = len(question.data["unittests"]["tests"])
-
- return form
-
-
def _make_unit_code(units: dict[str, str]) -> str:
"""Compose a dict mapping unit names to their code into an actual class body."""
result = ""