apply black to the whole codebase.

This commit is contained in:
Goffi 2026-03-09 09:22:04 +01:00
commit 82e2c6efac

View file

@ -31,8 +31,7 @@ class TestXEP0215:
host.memory.disco.has_feature = AsyncMock()
host.memory.disco.has_feature.return_value = True
services_elt = xml_tools.parse(
"""
services_elt = xml_tools.parse("""
<services xmlns="urn:xmpp:extdisco:2">
<service host="test.example" type="stun" port="1234" />
<service host="example.org" type="turn" port="5678" restricted="true">
@ -53,8 +52,7 @@ class TestXEP0215:
</x>
</service>
</services>"
"""
)
""")
services = xep_0215.parse_services(services_elt)
@ -109,8 +107,7 @@ class TestXEP0215:
client.IQ.return_value = iq_result
iq_result_elt = xml_tools.parse(
"""
iq_result_elt = xml_tools.parse("""
<iq type="result">
<services xmlns="urn:xmpp:extdisco:2">
<service host="test.example" type="stun" port="1234" />
@ -118,8 +115,7 @@ class TestXEP0215:
restricted="true" />
</services>
</iq>
"""
)
""")
iq_result.send.return_value = defer.succeed(iq_result_elt)
services = await xep_0215.get_external_services(client)
@ -149,16 +145,14 @@ class TestXEP0215:
client.IQ.return_value = iq_result
iq_result_elt = xml_tools.parse(
"""
iq_result_elt = xml_tools.parse("""
<iq type="result">
<credentials xmlns="urn:xmpp:extdisco:2">
<service host="test.example" type="stun" port="1234" username="user1"
password="pass1" restricted="true"/>
</credentials>
</iq>
"""
)
""")
iq_result.send.return_value = defer.succeed(iq_result_elt)
credentials = await xep_0215.request_credentials(client, "test.example", "stun")
@ -194,8 +188,7 @@ class TestXEP0215:
],
}
iq_elt = xml_tools.parse(
"""
iq_elt = xml_tools.parse("""
<iq type="set" from="test.example">
<services xmlns="urn:xmpp:extdisco:2">
<service action="add" host="example.net" type="stun" port="2345" />
@ -204,8 +197,7 @@ class TestXEP0215:
<service action="delete" host="example.org" type="turn" port="5678" />
</services>
</iq>
"""
)
""")
xep_0215.on_services_push(iq_elt, client)