From 8e7dd508c93ea52e720de0f75394c98317b9bee0 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 16 Oct 2026 21:40:19 +0200 Subject: [PATCH] style(tests): apply the formatter to the network_served tests The autoformat step of the gate wrapped the long assertions that 660ad2ff16 committed unformatted. No behaviour change. Co-Authored-By: Claude Opus 5.5 (1M context) --- .../plugins/lookup/test_network_served.py | 17 +++++++++++++---- .../applications/services/test_registry.py | 4 +++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/tests/unit/python/plugins/lookup/test_network_served.py b/tests/unit/python/plugins/lookup/test_network_served.py index 818bb9ec50..82acce90f9 100644 --- a/tests/unit/python/plugins/lookup/test_network_served.py +++ b/tests/unit/python/plugins/lookup/test_network_served.py @@ -30,13 +30,22 @@ class TestNetworkServedLookup(unittest.TestCase): def test_a_named_role_must_be_deployed(self): lookup = served_mod.LookupModule() variables = {"group_names": ["svc-net-tor", "web-app-keycloak"]} - self.assertTrue(lookup.run(["clearnet", "web-app-keycloak"], variables=variables)[0]) - self.assertFalse(lookup.run(["clearnet", "web-app-dashboard"], variables=variables)[0]) + self.assertTrue( + lookup.run(["clearnet", "web-app-keycloak"], variables=variables)[0] + ) + self.assertFalse( + lookup.run(["clearnet", "web-app-dashboard"], variables=variables)[0] + ) def test_a_deployed_role_on_a_tor_only_node_stays_off(self): lookup = served_mod.LookupModule() - variables = {"group_names": ["svc-net-tor", "web-app-keycloak"], "NETWORK_MODE": "tor"} - self.assertFalse(lookup.run(["clearnet", "web-app-keycloak"], variables=variables)[0]) + variables = { + "group_names": ["svc-net-tor", "web-app-keycloak"], + "NETWORK_MODE": "tor", + } + self.assertFalse( + lookup.run(["clearnet", "web-app-keycloak"], variables=variables)[0] + ) def test_a_mode_the_node_cannot_serve_fails_loudly(self): with self.assertRaises(AnsibleError): diff --git a/tests/unit/python/utils/roles/applications/services/test_registry.py b/tests/unit/python/utils/roles/applications/services/test_registry.py index ca26157262..c4276fd3e0 100644 --- a/tests/unit/python/utils/roles/applications/services/test_registry.py +++ b/tests/unit/python/utils/roles/applications/services/test_registry.py @@ -367,7 +367,9 @@ class TestExplicitTruth(unittest.TestCase): for token in GATED_LOOKUPS: name = token.split("'")[1] with self.subTest(lookup=name): - self.assertTrue((PROJECT_ROOT / "plugins" / "lookup" / f"{name}.py").is_file()) + self.assertTrue( + (PROJECT_ROOT / "plugins" / "lookup" / f"{name}.py").is_file() + ) def test_an_unregistered_jinja_expression_does_not_resolve(self): self.assertFalse(