diff sat/test/test_helpers_plugins.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_helpers_plugins.py	Wed Jun 27 07:51:29 2018 +0200
+++ b/sat/test/test_helpers_plugins.py	Wed Jun 27 20:14:46 2018 +0200
@@ -25,93 +25,100 @@
 
 
 class FakeXEP_0045Test(helpers.SatTestCase):
-
     def setUp(self):
         self.host = helpers.FakeSAT()
         self.plugin = helpers_plugins.FakeXEP_0045(self.host)
 
     def test_joinRoom(self):
         self.plugin.joinRoom(0, 0)
-        self.assertEqual('test', self.plugin.getNick(0, 0))
+        self.assertEqual("test", self.plugin.getNick(0, 0))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 0, 0))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 1, 0))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 2, 0))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 3, 0))
-        self.assertEqual('', self.plugin.getNick(0, 1))
+        self.assertEqual("", self.plugin.getNick(0, 1))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 0, 1))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 1, 1))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 2, 1))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 3, 1))
-        self.assertEqual('', self.plugin.getNick(0, 2))
+        self.assertEqual("", self.plugin.getNick(0, 2))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 0, 2))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 1, 2))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 2, 2))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 3, 2))
-        self.assertEqual('', self.plugin.getNick(0, 3))
+        self.assertEqual("", self.plugin.getNick(0, 3))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 0, 3))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 1, 3))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 2, 3))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 3, 3))
         self.plugin.joinRoom(0, 1)
-        self.assertEqual('test', self.plugin.getNick(0, 0))
+        self.assertEqual("test", self.plugin.getNick(0, 0))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 0, 0))
-        self.assertEqual('sender', self.plugin.getNickOfUser(0, 1, 0))
-        self.assertEqual('sender', self.plugin.getNickOfUser(0, 2, 0))
+        self.assertEqual("sender", self.plugin.getNickOfUser(0, 1, 0))
+        self.assertEqual("sender", self.plugin.getNickOfUser(0, 2, 0))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 3, 0))
-        self.assertEqual('sender', self.plugin.getNick(0, 1))
-        self.assertEqual('test', self.plugin.getNickOfUser(0, 0, 1))
+        self.assertEqual("sender", self.plugin.getNick(0, 1))
+        self.assertEqual("test", self.plugin.getNickOfUser(0, 0, 1))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 1, 1))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 2, 1))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 3, 1))
-        self.assertEqual('', self.plugin.getNick(0, 2))
+        self.assertEqual("", self.plugin.getNick(0, 2))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 0, 2))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 1, 2))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 2, 2))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 3, 2))
-        self.assertEqual('', self.plugin.getNick(0, 3))
+        self.assertEqual("", self.plugin.getNick(0, 3))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 0, 3))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 1, 3))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 2, 3))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 3, 3))
         self.plugin.joinRoom(0, 2)
-        self.assertEqual('test', self.plugin.getNick(0, 0))
+        self.assertEqual("test", self.plugin.getNick(0, 0))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 0, 0))
-        self.assertEqual('sender', self.plugin.getNickOfUser(0, 1, 0))
-        self.assertEqual('sender', self.plugin.getNickOfUser(0, 2, 0))
+        self.assertEqual("sender", self.plugin.getNickOfUser(0, 1, 0))
+        self.assertEqual("sender", self.plugin.getNickOfUser(0, 2, 0))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 3, 0))
-        self.assertEqual('sender', self.plugin.getNick(0, 1))
-        self.assertEqual('test', self.plugin.getNickOfUser(0, 0, 1))
-        self.assertEqual('sender', self.plugin.getNickOfUser(0, 1, 1))  # Const.JID[2] is in the roster for Const.PROFILE[1]
-        self.assertEqual('sender', self.plugin.getNickOfUser(0, 2, 1))
+        self.assertEqual("sender", self.plugin.getNick(0, 1))
+        self.assertEqual("test", self.plugin.getNickOfUser(0, 0, 1))
+        self.assertEqual(
+            "sender", self.plugin.getNickOfUser(0, 1, 1)
+        )  # Const.JID[2] is in the roster for Const.PROFILE[1]
+        self.assertEqual("sender", self.plugin.getNickOfUser(0, 2, 1))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 3, 1))
-        self.assertEqual('sender', self.plugin.getNick(0, 2))
-        self.assertEqual('test', self.plugin.getNickOfUser(0, 0, 2))
-        self.assertEqual('sender', self.plugin.getNickOfUser(0, 1, 2))
-        self.assertEqual('sender', self.plugin.getNickOfUser(0, 2, 2))   # Const.JID[1] is in the roster for Const.PROFILE[2]
+        self.assertEqual("sender", self.plugin.getNick(0, 2))
+        self.assertEqual("test", self.plugin.getNickOfUser(0, 0, 2))
+        self.assertEqual("sender", self.plugin.getNickOfUser(0, 1, 2))
+        self.assertEqual(
+            "sender", self.plugin.getNickOfUser(0, 2, 2)
+        )  # Const.JID[1] is in the roster for Const.PROFILE[2]
         self.assertEqual(None, self.plugin.getNickOfUser(0, 3, 2))
-        self.assertEqual('', self.plugin.getNick(0, 3))
+        self.assertEqual("", self.plugin.getNick(0, 3))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 0, 3))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 1, 3))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 2, 3))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 3, 3))
         self.plugin.joinRoom(0, 3)
-        self.assertEqual('test', self.plugin.getNick(0, 0))
+        self.assertEqual("test", self.plugin.getNick(0, 0))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 0, 0))
-        self.assertEqual('sender', self.plugin.getNickOfUser(0, 1, 0))
-        self.assertEqual('sender', self.plugin.getNickOfUser(0, 2, 0))
-        self.assertEqual('sender_', self.plugin.getNickOfUser(0, 3, 0))
-        self.assertEqual('sender', self.plugin.getNick(0, 1))
-        self.assertEqual('test', self.plugin.getNickOfUser(0, 0, 1))
-        self.assertEqual('sender', self.plugin.getNickOfUser(0, 1, 1))  # Const.JID[2] is in the roster for Const.PROFILE[1]
-        self.assertEqual('sender', self.plugin.getNickOfUser(0, 2, 1))
-        self.assertEqual('sender_', self.plugin.getNickOfUser(0, 3, 1))
-        self.assertEqual('sender', self.plugin.getNick(0, 2))
-        self.assertEqual('test', self.plugin.getNickOfUser(0, 0, 2))
-        self.assertEqual('sender', self.plugin.getNickOfUser(0, 1, 2))
-        self.assertEqual('sender', self.plugin.getNickOfUser(0, 2, 2))   # Const.JID[1] is in the roster for Const.PROFILE[2]
-        self.assertEqual('sender_', self.plugin.getNickOfUser(0, 3, 2))
-        self.assertEqual('sender_', self.plugin.getNick(0, 3))
-        self.assertEqual('test', self.plugin.getNickOfUser(0, 0, 3))
-        self.assertEqual('sender', self.plugin.getNickOfUser(0, 1, 3))
-        self.assertEqual('sender', self.plugin.getNickOfUser(0, 2, 3))
+        self.assertEqual("sender", self.plugin.getNickOfUser(0, 1, 0))
+        self.assertEqual("sender", self.plugin.getNickOfUser(0, 2, 0))
+        self.assertEqual("sender_", self.plugin.getNickOfUser(0, 3, 0))
+        self.assertEqual("sender", self.plugin.getNick(0, 1))
+        self.assertEqual("test", self.plugin.getNickOfUser(0, 0, 1))
+        self.assertEqual(
+            "sender", self.plugin.getNickOfUser(0, 1, 1)
+        )  # Const.JID[2] is in the roster for Const.PROFILE[1]
+        self.assertEqual("sender", self.plugin.getNickOfUser(0, 2, 1))
+        self.assertEqual("sender_", self.plugin.getNickOfUser(0, 3, 1))
+        self.assertEqual("sender", self.plugin.getNick(0, 2))
+        self.assertEqual("test", self.plugin.getNickOfUser(0, 0, 2))
+        self.assertEqual("sender", self.plugin.getNickOfUser(0, 1, 2))
+        self.assertEqual(
+            "sender", self.plugin.getNickOfUser(0, 2, 2)
+        )  # Const.JID[1] is in the roster for Const.PROFILE[2]
+        self.assertEqual("sender_", self.plugin.getNickOfUser(0, 3, 2))
+        self.assertEqual("sender_", self.plugin.getNick(0, 3))
+        self.assertEqual("test", self.plugin.getNickOfUser(0, 0, 3))
+        self.assertEqual("sender", self.plugin.getNickOfUser(0, 1, 3))
+        self.assertEqual("sender", self.plugin.getNickOfUser(0, 2, 3))
         self.assertEqual(None, self.plugin.getNickOfUser(0, 3, 3))