From d364a1319a7ea90d31efae2ec4b05c9115fe927e Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Fri, 7 Apr 2023 10:03:33 -0700 Subject: [PATCH] fix apache test --- .../certbot_apache/_internal/tests/autohsts_test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/certbot-apache/certbot_apache/_internal/tests/autohsts_test.py b/certbot-apache/certbot_apache/_internal/tests/autohsts_test.py index 4d7d2ec68..45268fcb3 100644 --- a/certbot-apache/certbot_apache/_internal/tests/autohsts_test.py +++ b/certbot-apache/certbot_apache/_internal/tests/autohsts_test.py @@ -128,11 +128,11 @@ class AutoHSTSTest(util.ApacheTest): max_val def test_autohsts_update_noop(self): - with mock.patch("time.time") as mock_time: - # Time mock is used to make sure that the execution does not + with mock.patch.object(self.config, '_autohsts_save_state') as mock_save_state: + # The mock is used to make sure that the execution does not # continue when no autohsts entries exist in pluginstorage self.config.update_autohsts(mock.MagicMock()) - assert mock_time.called is False + assert not mock_save_state.called def test_autohsts_make_permanent_noop(self): self.config.storage.put = mock.MagicMock()