diff sat/test/test_plugin_xep_0297.py @ 2624:56f94936df1e

code style reformatting using black
author Goffi <goffi@goffi.org>
date Wed, 27 Jun 2018 20:14:46 +0200
parents 26edcf3a30eb
children 378188abe941
line wrap: on
line diff
--- a/sat/test/test_plugin_xep_0297.py	Wed Jun 27 07:51:29 2018 +0200
+++ b/sat/test/test_plugin_xep_0297.py	Wed Jun 27 20:14:46 2018 +0200
@@ -30,18 +30,18 @@
 from wokkel.generic import parseXml
 
 
-NS_PUBSUB = 'http://jabber.org/protocol/pubsub'
+NS_PUBSUB = "http://jabber.org/protocol/pubsub"
 
 
 class XEP_0297Test(helpers.SatTestCase):
-
     def setUp(self):
         self.host = helpers.FakeSAT()
         self.plugin = XEP_0297(self.host)
-        self.host.plugins['XEP-0203'] = XEP_0203(self.host)
+        self.host.plugins["XEP-0203"] = XEP_0203(self.host)
 
     def test_delay(self):
-        stanza = parseXml("""
+        stanza = parseXml(
+            """
           <message from='juliet@capulet.lit/orchard'
                    id='0202197'
                    to='romeo@montague.lit'
@@ -51,7 +51,10 @@
                 <amorous/>
             </mood>
           </message>
-        """.encode('utf-8'))
+        """.encode(
+                "utf-8"
+            )
+        )
         output = """
           <message to='mercutio@verona.lit' type='chat'>
             <body>A most courteous exposition!</body>
@@ -71,8 +74,16 @@
           </message>
         """
         stamp = datetime.datetime(2010, 7, 10, 23, 8, 25, tzinfo=tzutc())
-        d = self.plugin.forward(stanza, JID('mercutio@verona.lit'), stamp,
-                                body='A most courteous exposition!',
-                                profile_key=C.PROFILE[0])
-        d.addCallback(lambda dummy: self.assertEqualXML(self.host.getSentMessageXml(0), output, True))
+        d = self.plugin.forward(
+            stanza,
+            JID("mercutio@verona.lit"),
+            stamp,
+            body="A most courteous exposition!",
+            profile_key=C.PROFILE[0],
+        )
+        d.addCallback(
+            lambda dummy: self.assertEqualXML(
+                self.host.getSentMessageXml(0), output, True
+            )
+        )
         return d