Mercurial > libervia-backend
comparison src/test/test_plugin_misc_room_game.py @ 993:301b342c697a
core: use of the new core.log module:
/!\ this is a massive refactoring and was largely automated, it probably did bring some bugs /!\
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 19 Apr 2014 19:19:19 +0200 |
parents | 3c270d691e56 |
children | b3f383ab39da |
comparison
equal
deleted
inserted
replaced
992:f51a1895275c | 993:301b342c697a |
---|---|
24 from constants import Const | 24 from constants import Const |
25 from sat.test import helpers, helpers_plugins | 25 from sat.test import helpers, helpers_plugins |
26 from sat.plugins import plugin_misc_room_game as plugin | 26 from sat.plugins import plugin_misc_room_game as plugin |
27 from twisted.words.protocols.jabber.jid import JID | 27 from twisted.words.protocols.jabber.jid import JID |
28 from wokkel.muc import User | 28 from wokkel.muc import User |
29 import traceback | |
30 import logging | 29 import logging |
31 | 30 |
32 # Data used for test initialization | 31 # Data used for test initialization |
33 NAMESERVICE = 'http://www.goffi.org/protocol/dummy' | 32 NAMESERVICE = 'http://www.goffi.org/protocol/dummy' |
34 TAG = 'dummy' | 33 TAG = 'dummy' |
59 self.plugin._init_(self.host, PLUGIN_INFO, (NAMESERVICE, TAG), game_init, player_init) | 58 self.plugin._init_(self.host, PLUGIN_INFO, (NAMESERVICE, TAG), game_init, player_init) |
60 self.plugin_0045 = self.host.plugins['XEP-0045'] = helpers_plugins.FakeXEP_0045(self.host) | 59 self.plugin_0045 = self.host.plugins['XEP-0045'] = helpers_plugins.FakeXEP_0045(self.host) |
61 self.plugin_0249 = self.host.plugins['XEP-0249'] = helpers_plugins.FakeXEP_0249(self.host) | 60 self.plugin_0249 = self.host.plugins['XEP-0249'] = helpers_plugins.FakeXEP_0249(self.host) |
62 logger = logging.getLogger() | 61 logger = logging.getLogger() |
63 level = logger.getEffectiveLevel() | 62 level = logger.getEffectiveLevel() |
64 logger.setLevel(logging.WARNING) # remove info pollution | 63 logger.setLevel(logging.WARNING) # remove log.info pollution |
65 for profile in Const.PROFILE: | 64 for profile in Const.PROFILE: |
66 self.host.getClient(profile) # init self.host.profiles[profile] | 65 self.host.getClient(profile) # init self.host.profiles[profile] |
67 logger.setLevel(level) | 66 logger.setLevel(level) |
68 | 67 |
69 def initGame(self, muc_index, user_index): | 68 def initGame(self, muc_index, user_index): |