diff --git a/tests/test_wireguard.py b/tests/test_wireguard.py index 7a8a43d..ba792f7 100644 --- a/tests/test_wireguard.py +++ b/tests/test_wireguard.py @@ -47,9 +47,11 @@ def test_conf_content_includes_preshared_key_when_present(): assert "PresharedKey = cHJlc2hhcmVkLWtleQ==" in content # Must sit between PublicKey and Endpoint, inside [Peer]. peer_section = content.split("[Peer]\n", 1)[1] - assert peer_section.index("PublicKey") < peer_section.index( - "PresharedKey" - ) < peer_section.index("Endpoint") + assert ( + peer_section.index("PublicKey") + < peer_section.index("PresharedKey") + < peer_section.index("Endpoint") + ) def test_enable_requires_wg_config(tmp_path):