From ae2d6ccac9d3c4d5181347e016660216212b3035 Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Tue, 9 Jul 2024 18:56:25 +0100 Subject: Move unittest filtering to the Form.dict() function --- backend/routes/forms/unittesting.py | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'backend/routes/forms/unittesting.py') 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 = "" -- cgit v1.2.3