From ce9b71616aed7d311b8144013dbec3f1a092e877 Mon Sep 17 00:00:00 2001 From: Ammar Ammar <43293485+ammar257ammar@users.noreply.github.com> Date: Tue, 10 Dec 2024 15:29:08 +0000 Subject: [PATCH] Add more tests --- .../hanging_protocols_tests/test_forms.py | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/app/tests/hanging_protocols_tests/test_forms.py b/app/tests/hanging_protocols_tests/test_forms.py index 8a1420a2e..0ba2189f4 100644 --- a/app/tests/hanging_protocols_tests/test_forms.py +++ b/app/tests/hanging_protocols_tests/test_forms.py @@ -330,6 +330,42 @@ def test_hanging_protocol_clientside(): }, ), ("main", False, {"json": ["Enter a valid JSON."]}), + ( + "[1,2,3,4,5]", + False, + { + "json": [ + "JSON does not fulfill schema: instance None of are valid under the given schema" + ] + }, + ), + ( + '["test1", "test2", "test3"]', + False, + { + "json": [ + "JSON does not fulfill schema: instance None of are valid under the given schema" + ] + }, + ), + ( + "[[],[],[]]", + False, + { + "json": [ + "JSON does not fulfill schema: instance None of are valid under the given schema" + ] + }, + ), + ( + "[{},{},{}]", + False, + { + "json": [ + "JSON does not fulfill schema: instance has non-unique elements" + ] + }, + ), ( "true", False,