Skip to content

Commit

Permalink
Chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelThamm committed Dec 9, 2024
1 parent f6c63a9 commit 0f595de
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/scenario/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

import pytest
import yaml
from ops import BlockedStatus
from ops.testing import Context, State

import charm
from ops import BlockedStatus


@pytest.fixture(autouse=True)
def patch_all(placeholder_cfg_path):
Expand All @@ -17,7 +18,7 @@ def patch_all(placeholder_cfg_path):

@pytest.mark.parametrize("log_level", ("debug", "info", "warn", "error"))
def test_valid_config_log_level(placeholder_cfg_path, log_level):
"""Asserts that all valid log_levels set the correct config"""
"""Asserts that all valid log_levels set the correct config."""
# GIVEN a GrafanaAgentMachineCharm
with patch("charm.GrafanaAgentMachineCharm.is_ready", True):
ctx = Context(charm_type=charm.GrafanaAgentMachineCharm)
Expand All @@ -31,7 +32,7 @@ def test_valid_config_log_level(placeholder_cfg_path, log_level):

@patch("charm.GrafanaAgentMachineCharm.is_ready", True)
def test_invalid_config_log_level(placeholder_cfg_path):
"""Asserts that an invalid log_level sets Blocked status"""
"""Asserts that an invalid log_level sets Blocked status."""
# GIVEN a GrafanaAgentMachineCharm
ctx = Context(charm_type=charm.GrafanaAgentMachineCharm)
with ctx(ctx.on.start(), State(config={"log_level": "foo"})) as mgr:
Expand Down

0 comments on commit 0f595de

Please sign in to comment.