feat: change config file format to yaml
- docs: add link to yaml.org BREAKING: The `ini` configuration file format changed to `yml`. Please rewrite your configuration file using the yaml format.
This commit is contained in:
parent
5d902ef962
commit
e4439390fe
11 changed files with 121 additions and 139 deletions
|
@ -134,28 +134,6 @@ def test_base_config_required_submodel(tmp_path: Path):
|
|||
FixtureWithRequiredSubmodelConfig(filepath=None)
|
||||
|
||||
|
||||
FIXTURE_CONFIG_RAW_INI = """
|
||||
[database]
|
||||
host = changed
|
||||
port = 6666
|
||||
"""
|
||||
|
||||
|
||||
def test_base_config_ini(tmp_path: Path):
|
||||
config_filepath = tmp_path / "config.conf"
|
||||
config_filepath.write_text(FIXTURE_CONFIG_RAW_INI)
|
||||
|
||||
with mock.patch.dict(
|
||||
environ,
|
||||
{"LIBRETIME_API_KEY": "f3bf04fc"},
|
||||
):
|
||||
config = FixtureConfig(filepath=config_filepath)
|
||||
|
||||
assert config.api_key == "f3bf04fc"
|
||||
assert config.database.host == "changed"
|
||||
assert config.database.port == 6666
|
||||
|
||||
|
||||
FIXTURE_CONFIG_RAW_MISSING = """
|
||||
database:
|
||||
host: "localhost"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue