Mercurial > libervia-backend
diff libervia/backend/test/test_plugin_misc_groupblog.py @ 4270:0d7bb4df2343
Reformatted code base using black.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 19 Jun 2024 18:44:57 +0200 |
parents | 4b842c1fb686 |
children |
line wrap: on
line diff
--- a/libervia/backend/test/test_plugin_misc_groupblog.py Tue Jun 18 12:06:45 2024 +0200 +++ b/libervia/backend/test/test_plugin_misc_groupblog.py Wed Jun 19 18:44:57 2024 +0200 @@ -155,7 +155,9 @@ self.host = helpers.FakeSAT() self.host.plugins["XEP-0060"] = plugin_xep_0060.XEP_0060(self.host) self.host.plugins["XEP-0163"] = plugin_xep_0163.XEP_0163(self.host) - importlib.reload(plugin_misc_text_syntaxes) # reload the plugin to avoid conflict error + importlib.reload( + plugin_misc_text_syntaxes + ) # reload the plugin to avoid conflict error self.host.plugins["TEXT_SYNTAXES"] = plugin_misc_text_syntaxes.TextSyntaxes( self.host ) @@ -189,9 +191,7 @@ d = self.psclient.items(SERVICE, NODE_ID) d.addCallback(lambda items: self.assertEqual(len(items), 0)) d.addCallback( - lambda __: self.plugin.sendGroupBlog( - "PUBLIC", [], "test", {}, C.PROFILE[0] - ) + lambda __: self.plugin.sendGroupBlog("PUBLIC", [], "test", {}, C.PROFILE[0]) ) d.addCallback(lambda __: self.psclient.items(SERVICE, NODE_ID)) return d.addCallback(lambda items: self.assertEqual(len(items), 1)) @@ -484,9 +484,7 @@ d.addCallback(lambda __: self.psclient.items(SERVICE, COMMENTS_NODE_ID_1)) d.addCallback(lambda items: self.assertEqual(len(items), 2)) - d.addCallback( - lambda __: self.psclient.publish(SERVICE, OTHER_NODE_ID, [ITEM_2]) - ) + d.addCallback(lambda __: self.psclient.publish(SERVICE, OTHER_NODE_ID, [ITEM_2])) d.addCallback( lambda __: self.psclient.publish( SERVICE, COMMENTS_NODE_ID_2, [COMMENT_1, COMMENT_2] @@ -532,9 +530,7 @@ d.addCallback(lambda __: self.psclient.items(SERVICE, COMMENTS_NODE_ID_1)) d.addCallback(lambda items: self.assertEqual(len(items), 2)) - d.addCallback( - lambda __: self.psclient.publish(SERVICE, OTHER_NODE_ID, [ITEM_2]) - ) + d.addCallback(lambda __: self.psclient.publish(SERVICE, OTHER_NODE_ID, [ITEM_2])) d.addCallback( lambda __: self.psclient.publish( SERVICE, COMMENTS_NODE_ID_2, [COMMENT_1, COMMENT_2] @@ -579,9 +575,7 @@ d.addCallback(lambda __: self.psclient.items(SERVICE, COMMENTS_NODE_ID_1)) d.addCallback(lambda items: self.assertEqual(len(items), 2)) - d.addCallback( - lambda __: self.psclient.publish(SERVICE, OTHER_NODE_ID, [ITEM_2]) - ) + d.addCallback(lambda __: self.psclient.publish(SERVICE, OTHER_NODE_ID, [ITEM_2])) d.addCallback( lambda __: self.psclient.publish( SERVICE, COMMENTS_NODE_ID_2, [COMMENT_1, COMMENT_2] @@ -598,9 +592,7 @@ ] return res - d.addCallback( - lambda __: self.plugin.deleteAllGroupBlogsAndComments(C.PROFILE[0]) - ) + d.addCallback(lambda __: self.plugin.deleteAllGroupBlogsAndComments(C.PROFILE[0])) d.addCallback(clean) d.addCallback(lambda __: self.psclient.items(SERVICE, NODE_ID))