apply black to the whole codebase.
This commit is contained in:
parent
420df3340d
commit
82e2c6efac
1 changed files with 175 additions and 448 deletions
|
|
@ -49,7 +49,6 @@ from libervia.backend.tools import xml_tools
|
|||
from libervia.backend.tools.common import uri as xmpp_uri
|
||||
from libervia.backend.tools.utils import xmpp_date
|
||||
|
||||
|
||||
TEST_BASE_URL = "https://example.org"
|
||||
TEST_USER = "test_user"
|
||||
TEST_AP_ACCOUNT = f"{TEST_USER}@example.org"
|
||||
|
|
@ -1360,8 +1359,7 @@ class TestActivityPubGateway:
|
|||
node=ap_gateway._m.namespace,
|
||||
item=ap_item["id"],
|
||||
)
|
||||
item_elt = xml_tools.parse(
|
||||
f"""
|
||||
item_elt = xml_tools.parse(f"""
|
||||
<item id="123" publisher="{TEST_JID}/res.123">
|
||||
<entry xmlns="http://www.w3.org/2005/Atom">
|
||||
<title type="text">test message 1</title>
|
||||
|
|
@ -1380,8 +1378,7 @@ class TestActivityPubGateway:
|
|||
<link href="{ap_item_url}" rel="via"/>
|
||||
</entry>
|
||||
</item>
|
||||
"""
|
||||
)
|
||||
""")
|
||||
item_elt.uri = pubsub.NS_PUBSUB_EVENT
|
||||
|
||||
with patch.object(ap_gateway, "ap_post") as ap_post:
|
||||
|
|
@ -1473,15 +1470,13 @@ class TestActivityPubGateway:
|
|||
attachment_node = ap_gateway._pa.get_attachment_node_name(
|
||||
recipient_jid, ap_gateway._m.namespace, ap_item["id"]
|
||||
)
|
||||
item_elt = xml_tools.parse(
|
||||
f"""
|
||||
item_elt = xml_tools.parse(f"""
|
||||
<item id="{TEST_JID.userhost()}" published="{TEST_JID.userhostJID()}">
|
||||
<attachments xmlns="urn:xmpp:pubsub-attachments:1">
|
||||
<noticed timestamp="2022-07-22T12:29:45Z"/>
|
||||
</attachments>
|
||||
</item>
|
||||
"""
|
||||
)
|
||||
""")
|
||||
item_elt.uri = pubsub.NS_PUBSUB_EVENT
|
||||
items_event = pubsub.ItemsEvent(
|
||||
TEST_JID, recipient_jid, attachment_node, [item_elt], {}
|
||||
|
|
@ -1565,8 +1560,7 @@ class TestActivityPubGateway:
|
|||
recipient_jid, ap_gateway._m.namespace, ap_item["id"]
|
||||
)
|
||||
reactions = ["🦁", "🥜", "🎻"]
|
||||
item_elt = xml_tools.parse(
|
||||
f"""
|
||||
item_elt = xml_tools.parse(f"""
|
||||
<item id="{TEST_JID.userhost()}" published="{TEST_JID.userhostJID()}">
|
||||
<attachments xmlns="urn:xmpp:pubsub-attachments:1">
|
||||
<reactions timestamp="2022-08-31T12:17:23Z">
|
||||
|
|
@ -1576,8 +1570,7 @@ class TestActivityPubGateway:
|
|||
</reactions>
|
||||
</attachments>
|
||||
</item>
|
||||
"""
|
||||
)
|
||||
""")
|
||||
item_elt.uri = pubsub.NS_PUBSUB_EVENT
|
||||
items_event = pubsub.ItemsEvent(
|
||||
TEST_JID, recipient_jid, attachment_node, [item_elt], {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue