From a7ca9e08aec02bd41470d07909bcebd2169de89e Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Wed, 6 Jul 2022 23:22:57 -0400 Subject: [PATCH] Refactor naming in configuration fixtures --- tests/unit/providers/configuration/conftest.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/unit/providers/configuration/conftest.py b/tests/unit/providers/configuration/conftest.py index b02ffc40..96e583dd 100644 --- a/tests/unit/providers/configuration/conftest.py +++ b/tests/unit/providers/configuration/conftest.py @@ -52,14 +52,14 @@ def ini_config_file_2(tmp_path): @fixture def ini_config_file_3(tmp_path): - ini_config_file_3 = str(tmp_path / "config_3.ini") - with open(ini_config_file_3, "w") as file: + config_file = str(tmp_path / "config_3.ini") + with open(config_file, "w") as file: file.write( "[section1]\n" "value1=${CONFIG_TEST_ENV}\n" "value2=${CONFIG_TEST_PATH}/path\n" ) - return ini_config_file_3 + return config_file @fixture @@ -92,14 +92,14 @@ def yaml_config_file_2(tmp_path): @fixture def yaml_config_file_3(tmp_path): - yaml_config_file_3 = str(tmp_path / "config_3.yml") - with open(yaml_config_file_3, "w") as file: + config_file = str(tmp_path / "config_3.yml") + with open(config_file, "w") as file: file.write( "section1:\n" " value1: ${CONFIG_TEST_ENV}\n" " value2: ${CONFIG_TEST_PATH}/path\n" ) - return yaml_config_file_3 + return config_file @fixture @@ -143,8 +143,8 @@ def json_config_file_2(tmp_path): @fixture def json_config_file_3(tmp_path): - yaml_config_file_3 = str(tmp_path / "config_3.json") - with open(yaml_config_file_3, "w") as file: + config_file = str(tmp_path / "config_3.json") + with open(config_file, "w") as file: file.write( json.dumps( { @@ -155,7 +155,7 @@ def json_config_file_3(tmp_path): }, ), ) - return yaml_config_file_3 + return config_file @fixture(autouse=True)