diff libervia/backend/test/test_plugin_misc_room_game.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_room_game.py	Tue Jun 18 12:06:45 2024 +0200
+++ b/libervia/backend/test/test_plugin_misc_room_game.py	Wed Jun 19 18:44:57 2024 +0200
@@ -91,7 +91,9 @@
     def test_create_or_invite_solo(self):
         self.reinit()
         self.plugin_0045.join_room(0, 0)
-        self.plugin._create_or_invite(self.plugin_0045.get_room(0, 0), [], Const.PROFILE[0])
+        self.plugin._create_or_invite(
+            self.plugin_0045.get_room(0, 0), [], Const.PROFILE[0]
+        )
         self.assertTrue(self.plugin._game_exists(ROOM_JID, True))
 
     def test_create_or_invite_multi_not_waiting(self):
@@ -261,7 +263,9 @@
         self.reinit()
         self.init_game(0, 0)
         self.assertTrue(self.plugin.is_referee(ROOM_JID, self.plugin_0045.get_nick(0, 0)))
-        self.assertFalse(self.plugin.is_referee(ROOM_JID, self.plugin_0045.get_nick(0, 1)))
+        self.assertFalse(
+            self.plugin.is_referee(ROOM_JID, self.plugin_0045.get_nick(0, 1))
+        )
 
     def test_is_player(self):
         self.reinit()
@@ -276,7 +280,8 @@
         def check(value, other_players, confirmed, rest):
             room = self.plugin_0045.get_room(0, 0)
             self.assertEqual(
-                (value, confirmed, rest), self.plugin._check_wait_auth(room, other_players)
+                (value, confirmed, rest),
+                self.plugin._check_wait_auth(room, other_players),
             )
 
         self.reinit()
@@ -407,7 +412,8 @@
         # but Const.JID[3] is actually not in the room
         self.assertEqual(self.plugin_0045.get_nick_of_user(0, 3, 0), None)
         self.assertEqual(
-            (True, False), self.plugin._check_create_game_and_init(ROOM_JID, Const.PROFILE[0])
+            (True, False),
+            self.plugin._check_create_game_and_init(ROOM_JID, Const.PROFILE[0]),
         )
 
     def test_prepare_room_score_2(self):
@@ -442,7 +448,9 @@
         # wrong profile
         user_nick = self.plugin_0045.join_room(0, 1)
         room = self.plugin_0045.get_room(0, 1)
-        self.plugin.user_joined_trigger(room, User(user_nick, Const.JID[1]), OTHER_PROFILE)
+        self.plugin.user_joined_trigger(
+            room, User(user_nick, Const.JID[1]), OTHER_PROFILE
+        )
         self.assertEqual(
             self.host.get_sent_message(0), None
         )  # no new message has been sent
@@ -589,13 +597,15 @@
 
         helpers.mute_logging()
         self.assertEqual(
-            (False, False), self.plugin._check_create_game_and_init(ROOM_JID, OTHER_PROFILE)
+            (False, False),
+            self.plugin._check_create_game_and_init(ROOM_JID, OTHER_PROFILE),
         )
         helpers.unmute_logging()
 
         self.plugin_0045.join_room(0, 1)
         self.assertEqual(
-            (False, False), self.plugin._check_create_game_and_init(ROOM_JID, OTHER_PROFILE)
+            (False, False),
+            self.plugin._check_create_game_and_init(ROOM_JID, OTHER_PROFILE),
         )
 
         self.plugin.create_game(ROOM_JID, [Const.JID[1]], PROFILE)
@@ -603,7 +613,8 @@
             (False, True), self.plugin._check_create_game_and_init(ROOM_JID, PROFILE)
         )
         self.assertEqual(
-            (False, False), self.plugin._check_create_game_and_init(ROOM_JID, OTHER_PROFILE)
+            (False, False),
+            self.plugin._check_create_game_and_init(ROOM_JID, OTHER_PROFILE),
         )
 
     def test_create_game(self):