From 3714789ab39446c9fdf6887b62f5f2a3a22eabb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Fr=C3=B6lich?= Date: Fri, 15 Mar 2024 14:21:35 +0100 Subject: [PATCH] fixed a validation-error for valid names, which caused server-CI to fail (#171) * fixed a validation-error for valid names, which caused server-CI to fail * fixed an additional validation-error, also caused by incorrect test-input-values --- server/tests/test_validation.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/tests/test_validation.py b/server/tests/test_validation.py index 6f6734a1..f92a1f51 100644 --- a/server/tests/test_validation.py +++ b/server/tests/test_validation.py @@ -10,7 +10,7 @@ @pytest.mark.parametrize( - "value", ["x", "x-x", "x-x-x", "x" * 64, "12345678", "example", "12345678-abc"] + "value", ["x", "x-x", "x-x-x", "x" * 64, "example"] ) def test_validate_type_name_pass(value): pydantic.TypeAdapter(validation.types.Name).validate_python(value) @@ -36,6 +36,8 @@ def test_validate_type_name_pass(value): "щен", '"', ".;", + "12345678", + "12345678-abc", ], ) def test_validate_type_name_fail(value): @@ -43,7 +45,7 @@ def test_validate_type_name_fail(value): pydantic.TypeAdapter(validation.types.Name).validate_python(value) -@pytest.mark.parametrize("value", ["x", "x_x", "x_x_x", "x" * 64, "abc", "example_abc"]) +@pytest.mark.parametrize("value", ["x", "x_x", "x_x_x", "x" * 64, "abc", "example_abc", "example_123"]) def test_validate_type_key_pass(value): pydantic.TypeAdapter(validation.types.Key).validate_python(value) @@ -69,7 +71,7 @@ def test_validate_type_key_pass(value): '"', ".;", "12345678", - "example_123", + "12example_123", ], ) def test_validate_type_key_fail(value):