Skip to content

Commit

Permalink
extends tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov committed Nov 11, 2024
1 parent d2edb79 commit 8a96f7b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion services/autoscaling/tests/unit/test_core_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,16 @@ def test_EC2_INSTANCES_ALLOWED_TYPES_empty_not_allowed( # noqa: N802

# now as part of AUTOSCALING_EC2_INSTANCES: EC2InstancesSettings | None
assert os.environ["AUTOSCALING_EC2_INSTANCES"] == "{}"

with pytest.raises(ValidationError) as err_info:
ApplicationSettings.create_from_envs(AUTOSCALING_EC2_INSTANCES={})

before = err_info.value.errors()

with pytest.raises(ValidationError) as err_info:
ApplicationSettings.create_from_envs()

assert err_info.value.errors()
assert err_info.value.errors() == before

# removing any value for AUTOSCALING_EC2_INSTANCES
monkeypatch.delenv("AUTOSCALING_EC2_INSTANCES")
Expand Down

0 comments on commit 8a96f7b

Please sign in to comment.