From e5aeed8c87c15a2ac988b250823c7bab1cda6bc5 Mon Sep 17 00:00:00 2001 From: mhorky Date: Wed, 13 Nov 2024 16:15:39 +0100 Subject: [PATCH] fix: Load the organization ID as a string This is a workaround to a bug in dynaconf. OrgID is commonly (but doesn't have to be) a string-integer, and gets parsed as int instead (on versions >3.2.3). According to the bug report linked in the patch, it will be addressed in dynaconf>=3.3.0. --- pytest_client_tools/test_config.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pytest_client_tools/test_config.py b/pytest_client_tools/test_config.py index c4ad4b6..ab4081c 100644 --- a/pytest_client_tools/test_config.py +++ b/pytest_client_tools/test_config.py @@ -30,6 +30,11 @@ def __init__(self): Validator("candlepin.activation_keys", is_type_of=list), Validator( "candlepin.org", + is_type_of=str, + # Fix for a regression in dynaconf, can be removed with dynaconf>=3.3.0 + # https://github.com/dynaconf/dynaconf/issues/1064 + # "Validator default string parsed to number" + cast=str, must_exist=True, when=Validator( "candlepin.activation_keys",