diff --git a/tests/unit/test_charm.py b/tests/unit/test_charm.py index 40e6f24b..ecf9ebce 100644 --- a/tests/unit/test_charm.py +++ b/tests/unit/test_charm.py @@ -526,13 +526,18 @@ def test_sidekiq_env_variable(): harness.set_can_connect(CONTAINER_NAME, True) harness.container_pebble_ready(CONTAINER_NAME) - plan_before_set_config = harness.get_container_pebble_plan(CONTAINER_NAME).services["discourse"].environment + plan_before_set_config = ( + harness.get_container_pebble_plan(CONTAINER_NAME).services["discourse"].environment + ) harness.update_config({"sidekiq_max_memory": 500}) - plan_after_set_config = harness.get_container_pebble_plan(CONTAINER_NAME).services["discourse"].environment + plan_after_set_config = ( + harness.get_container_pebble_plan(CONTAINER_NAME).services["discourse"].environment + ) assert plan_before_set_config != plan_after_set_config assert "1000" in plan_before_set_config["UNICORN_SIDEKIQ_MAX_RSS"] assert "500" in plan_after_set_config["UNICORN_SIDEKIQ_MAX_RSS"] + def test_handle_pebble_ready_event(): """ arrange: given a deployed discourse charm with all the required relations