Skip to content

Commit

Permalink
linter reqs
Browse files Browse the repository at this point in the history
  • Loading branch information
IbraAoad committed May 24, 2024
1 parent 9ba0e48 commit 55fc648
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/unit/test_kubernetes_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,14 +405,14 @@ def test_patch_k8s_service(self, client_patch):
with self.assertLogs(MOD_PATH) as logs:
self.harness.charm.service_patch._patch(None)
msg = "Kubernetes service patch failed: `juju trust` this application."
self.assertIn(msg, ";".join(logs.output))
self.assertTrue(msg in ";".join(logs.output))

client_patch.reset()
client_patch.side_effect = _FakeApiError(500)

with self.assertLogs(MOD_PATH) as logs:
self.harness.charm.service_patch._patch(None)
self.assertIn("Kubernetes service patch failed: broken", ";".join(logs.output))
self.assertTrue("Kubernetes service patch failed: broken" in ";".join(logs.output))

@patch(f"{MOD_PATH}.Client.get")
@patch(f"{CL_PATH}._namespace", "test")
Expand Down Expand Up @@ -485,7 +485,7 @@ def test_is_patched_k8s_service_api_error_with_default_name(self, client):
with self.assertLogs(MOD_PATH) as logs:
with self.assertRaises(_FakeApiError):
self.harness.charm.service_patch.is_patched()
self.assertIn("Kubernetes service get failed: broken", ";".join(logs.output))
self.assertTrue("Kubernetes service get failed: broken" in ";".join(logs.output))

@patch(f"{MOD_PATH}.ApiError", _FakeApiError)
@patch(f"{CL_PATH}._namespace", "test")
Expand All @@ -499,4 +499,4 @@ def test_is_patched_k8s_service_api_error_not_404(self, client):
with self.assertLogs(MOD_PATH) as logs:
with self.assertRaises(_FakeApiError):
charm.custom_service_name_service_patch.is_patched()
self.assertIn("Kubernetes service get failed: broken", ";".join(logs.output))
self.assertTrue("Kubernetes service get failed: broken" in ";".join(logs.output))

0 comments on commit 55fc648

Please sign in to comment.