From e80fdd60c816a19d0ff25c5436e2dff4c2c35437 Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Mon, 15 Apr 2024 01:57:09 +0300 Subject: [PATCH] tests: update conftest.py --- tests/conftest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index ccae1c8..08d0ffc 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -198,14 +198,14 @@ def return_a_value_for_a_field_type( bool: True, } - if type(None) in typing.get_args(field_type): + if field in field_dictionary: + return field_dictionary[field] + elif type(None) in typing.get_args(field_type): return return_a_value_for_a_field_type(field, field_type.__args__[0]) elif typing.get_origin(field_type) == typing.Literal: return field_type.__args__[0] elif typing.get_origin(field_type) == typing.Union: return return_a_value_for_a_field_type(field, field_type.__args__[0]) - elif field in field_dictionary: - return field_dictionary[field] elif field_type in field_type_dictionary: return field_type_dictionary[field_type]