test: configuration/use of new logging system
This commit is contained in:
parent
a3186ac2e3
commit
edf5db192f
1 changed files with 23 additions and 14 deletions
|
|
@ -21,12 +21,14 @@
|
|||
""" 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
|
||||
from twisted.words.protocols.jabber.jid import JID
|
||||
from wokkel.muc import User
|
||||
import logging
|
||||
|
||||
from logging import WARNING
|
||||
|
||||
# Data used for test initialization
|
||||
NAMESERVICE = 'http://www.goffi.org/protocol/dummy'
|
||||
|
|
@ -58,9 +60,9 @@ class RoomGameTest(helpers.SatTestCase):
|
|||
self.plugin._init_(self.host, PLUGIN_INFO, (NAMESERVICE, TAG), game_init, player_init)
|
||||
self.plugin_0045 = self.host.plugins['XEP-0045'] = helpers_plugins.FakeXEP_0045(self.host)
|
||||
self.plugin_0249 = self.host.plugins['XEP-0249'] = helpers_plugins.FakeXEP_0249(self.host)
|
||||
logger = logging.getLogger()
|
||||
logger = getLogger()
|
||||
level = logger.getEffectiveLevel()
|
||||
logger.setLevel(logging.WARNING) # remove log.info pollution
|
||||
logger.setLevel(WARNING) # remove log.info pollution
|
||||
for profile in Const.PROFILE:
|
||||
self.host.getClient(profile) # init self.host.profiles[profile]
|
||||
logger.setLevel(level)
|
||||
|
|
|
|||
Loading…
Reference in a new issue