From a74568e8d3e84dc58e7479788cb30ae81a4e130b Mon Sep 17 00:00:00 2001 From: Ben Hoyt Date: Thu, 5 Jan 2023 17:28:07 +1300 Subject: [PATCH] Set SIMULATE_CAN_CONNECT so tests pass on existing versions of ops See also https://github.com/canonical/operator/pull/873 --- tests/test_charm.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_charm.py b/tests/test_charm.py index 09a29e5..e8affef 100644 --- a/tests/test_charm.py +++ b/tests/test_charm.py @@ -6,11 +6,15 @@ import unittest from unittest.mock import Mock, patch +import ops.testing from charm import HelloKubeconCharm from ops.model import ActiveStatus from ops.testing import Harness +ops.testing.SIMULATE_CAN_CONNECT = True + + class TestCharm(unittest.TestCase): def setUp(self): self.harness = Harness(HelloKubeconCharm)