@@ -19,39 +19,22 @@ def disable_charm_tracing():
1919 yield
2020
2121
22- # class _MockRefresh:
23- # in_progress = False
24- # next_unit_allowed_to_refresh = True
25- # workload_allowed_to_start = True
26- # app_status_higher_priority = None
27- # unit_status_higher_priority = None
28- #
29- # def __init__(self, _, /):
30- # pass
31- #
32- # def unit_status_lower_priority(self, *, workload_is_running=True):
33- # return None
34-
35-
36- # @pytest.fixture(autouse=True)
37- # def patch(monkeypatch):
38- # monkeypatch.setattr("charm_refresh.Kubernetes", _MockRefresh)
39-
40-
4122@pytest .fixture (autouse = True )
4223def mock_refresh ():
4324 """Fixture to shunt refresh logic and events."""
4425 refresh_mock = Mock ()
4526 refresh_mock .in_progress = False
27+ refresh_mock .app_status_higher_priority = None
28+ refresh_mock .app_status_lower_priority .return_value = None
4629 refresh_mock .unit_status_higher_priority = None
4730 refresh_mock .unit_status_lower_priority .return_value = None
4831 refresh_mock .next_unit_allowed_to_refresh = True
4932 refresh_mock .workload_allowed_to_start = True
5033
5134 # Mock the _RefreshVersions class to avoid KeyError when charm key is missing
5235 versions_mock = Mock ()
53- versions_mock .charm = "v1/4 .0.0"
54- versions_mock .workload = "4.0.0 "
36+ versions_mock .charm = "v1/16 .0.0"
37+ versions_mock .workload = "16.10 "
5538
5639 with (
5740 patch ("charm_refresh.Kubernetes" , Mock (return_value = refresh_mock )),
0 commit comments