apply black to the whole codebase.

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

View file

@ -247,8 +247,7 @@ class TestXEP0167Mapping:
def test_parse_description(self):
"""Parsing <description> to a dict is successful"""
description_element = xml_tools.parse(
"""
description_element = xml_tools.parse("""
<description xmlns="urn:xmpp:jingle:apps:rtp:1" media="audio">
<payload-type id="96" channels="2" clockrate="48000" maxptime="60" name="opus" ptime="20">
<parameter name="sprop-stereo" value="1" />
@ -259,8 +258,7 @@ class TestXEP0167Mapping:
<crypto tag="1" crypto-suite="AES_CM_128_HMAC_SHA1_80" key-params="inline:DPSKYRle84Ua2MjbScjadpCvFQH5Tutuls2N4/xx" session-params="" />
</encryption>
</description>
"""
)
""")
parsed_data = mapping.parse_description(description_element)
@ -296,16 +294,14 @@ class TestXEP0167:
mock_call_info = MagicMock()
host.bridge.call_info = mock_call_info
jingle_elt = xml_tools.parse(
"""
jingle_elt = xml_tools.parse("""
<jingle xmlns='urn:xmpp:jingle:1'
action='session-info'
initiator='client1@example.org'
sid='a73sjjvkla37jfea'>
<mute xmlns="urn:xmpp:jingle:apps:rtp:info:1" name="mute_name"/>
</jingle>
"""
)
""")
xep_0167.jingle_session_info(client, "mute", session, "content_name", jingle_elt)
@ -323,16 +319,14 @@ class TestXEP0167:
mock_call_info = MagicMock()
host.bridge.call_info = mock_call_info
jingle_elt = xml_tools.parse(
"""
jingle_elt = xml_tools.parse("""
<jingle xmlns='urn:xmpp:jingle:1'
action='session-info'
initiator='client1@example.org'
sid='a73sjjvkla37jfea'>
<invalid xmlns="urn:xmpp:jingle:apps:rtp:info:1" name="invalid_name"/>
</jingle>
"""
)
""")
xep_0167.jingle_session_info(
client, "invalid", session, "content_name", jingle_elt
@ -345,8 +339,7 @@ class TestXEP0167:
session_id = "123"
extra = {"name": "test"}
iq_elt = xml_tools.parse(
"""
iq_elt = xml_tools.parse("""
<iq from='client1@example.org'
id='yh3gr714'
to='client2@example.net'
@ -358,8 +351,7 @@ class TestXEP0167:
<active xmlns='urn:xmpp:jingle:apps:rtp:info:1'/>
</jingle>
</iq>
"""
)
""")
jingle_elt = iq_elt.firstChildElement()
mock_send = MagicMock()
iq_elt.send = mock_send