Mercurial > libervia-backend
diff src/test/test_plugin_misc_room_game.py @ 1909:0681d69cbe0a
test: add helpers methods muteLogging and unmuteLogging
author | souliane <souliane@mailoo.org> |
---|---|
date | Fri, 11 Mar 2016 16:41:44 +0100 |
parents | d17772b0fe22 |
children | 2daf7b4c6756 |
line wrap: on
line diff
--- a/src/test/test_plugin_misc_room_game.py Fri Mar 11 16:38:23 2016 +0100 +++ b/src/test/test_plugin_misc_room_game.py Fri Mar 11 16:41:44 2016 +0100 @@ -21,7 +21,6 @@ """ Tests for the plugin room game (base class for MUC games) """ from sat.core.i18n import _ -from sat.core.log import getLogger from constants import Const from sat.test import helpers, helpers_plugins from sat.plugins import plugin_misc_room_game as plugin @@ -430,7 +429,9 @@ def test__checkCreateGameAndInit(self): self.reinit() - self.assertEqual((False, False), self.plugin._checkCreateGameAndInit(ROOM_JID, PROFILE)) # print internal error + helpers.muteLogging() + self.assertEqual((False, False), self.plugin._checkCreateGameAndInit(ROOM_JID, PROFILE)) + helpers.unmuteLogging() nick = self.plugin_0045.joinRoom(0, 0) self.assertEqual((True, False), self.plugin._checkCreateGameAndInit(ROOM_JID, PROFILE)) @@ -438,7 +439,9 @@ self.assertFalse(self.plugin._gameExists(ROOM_JID, True)) self.assertTrue(self.plugin.isReferee(ROOM_JID, nick)) - self.assertEqual((False, False), self.plugin._checkCreateGameAndInit(ROOM_JID, OTHER_PROFILE)) # print internal error + helpers.muteLogging() + self.assertEqual((False, False), self.plugin._checkCreateGameAndInit(ROOM_JID, OTHER_PROFILE)) + helpers.unmuteLogging() self.plugin_0045.joinRoom(0, 1) self.assertEqual((False, False), self.plugin._checkCreateGameAndInit(ROOM_JID, OTHER_PROFILE))