diff sat/test/test_plugin_xep_0203.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 003b8b4b56a7
line wrap: on
line diff
--- a/sat/test/test_plugin_xep_0203.py	Wed Jun 27 07:51:29 2018 +0200
+++ b/sat/test/test_plugin_xep_0203.py	Wed Jun 27 20:14:46 2018 +0200
@@ -27,11 +27,10 @@
 from dateutil.tz import tzutc
 import datetime
 
-NS_PUBSUB = 'http://jabber.org/protocol/pubsub'
+NS_PUBSUB = "http://jabber.org/protocol/pubsub"
 
 
 class XEP_0203Test(helpers.SatTestCase):
-
     def setUp(self):
         self.host = helpers.FakeSAT()
         self.plugin = XEP_0203(self.host)
@@ -44,7 +43,8 @@
             Offline Storage
           </delay>
         """
-        message_xml = """
+        message_xml = (
+            """
         <message
             from='romeo@montague.net/orchard'
             to='juliet@capulet.com'
@@ -52,14 +52,16 @@
           <body>text</body>
           %s
         </message>
-        """ % delay_xml
+        """
+            % delay_xml
+        )
 
-        parent = domish.Element((None, 'message'))
-        parent['from'] = 'romeo@montague.net/orchard'
-        parent['to'] = 'juliet@capulet.com'
-        parent['type'] = 'chat'
-        parent.addElement('body', None, 'text')
+        parent = domish.Element((None, "message"))
+        parent["from"] = "romeo@montague.net/orchard"
+        parent["to"] = "juliet@capulet.com"
+        parent["type"] = "chat"
+        parent.addElement("body", None, "text")
         stamp = datetime.datetime(2002, 9, 10, 23, 8, 25, tzinfo=tzutc())
-        elt = self.plugin.delay(stamp, JID('capulet.com'), 'Offline Storage', parent)
+        elt = self.plugin.delay(stamp, JID("capulet.com"), "Offline Storage", parent)
         self.assertEqualXML(elt.toXml(), delay_xml, True)
         self.assertEqualXML(parent.toXml(), message_xml, True)