Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zzstoatzz committed Jul 25, 2024
1 parent a7309ca commit 7d2ecb6
Showing 1 changed file with 14 additions and 23 deletions.
37 changes: 14 additions & 23 deletions tests/test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,31 +569,22 @@ def test_load_profiles_empty_file(self, temporary_profiles_path):

def test_load_profiles_with_default(self, temporary_profiles_path):
temporary_profiles_path.write_text(
textwrap.dedent(
"""
[profiles.default]
PREFECT_API_KEY = "foo"
"""
[profiles.default]
PREFECT_API_KEY = "foo"
[profiles.bar]
PREFECT_API_KEY = "bar"
"""
)
)
assert load_profiles() == ProfilesCollection(
profiles=[
Profile(
name="default",
settings={PREFECT_API_KEY: "foo"},
source=temporary_profiles_path,
),
Profile(
name="bar",
settings={PREFECT_API_KEY: "bar"},
source=temporary_profiles_path,
),
],
active="default",
[profiles.bar]
PREFECT_API_KEY = "bar"
"""
)
profiles = load_profiles()
expected = {
"default": {PREFECT_API_KEY: "foo"},
"bar": {PREFECT_API_KEY: "bar"},
}
for name, settings in expected.items():
assert profiles[name].settings == settings
assert profiles[name].source == temporary_profiles_path

def test_load_profile_default(self):
assert load_profile("default") == Profile(
Expand Down

0 comments on commit 7d2ecb6

Please sign in to comment.