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,6 +21,7 @@
|
|||
""" Tests for the plugin radiocol """
|
||||
|
||||
from sat.core import exceptions
|
||||
from sat.core.log import getLogger
|
||||
from sat.test import helpers, helpers_plugins
|
||||
from sat.plugins import plugin_misc_radiocol as plugin
|
||||
from sat.plugins import plugin_misc_room_game as plugin_room_game
|
||||
|
|
@ -36,10 +37,10 @@ from twisted.trial.unittest import SkipTest
|
|||
from mutagen.oggvorbis import OggVorbis
|
||||
|
||||
import uuid
|
||||
import logging
|
||||
import os
|
||||
import copy
|
||||
import shutil
|
||||
from logging import WARNING
|
||||
|
||||
ROOM_JID_S = Const.MUC_STR[0]
|
||||
PROFILE = Const.PROFILE[0]
|
||||
|
|
@ -61,9 +62,9 @@ class RadiocolTest(helpers.SatTestCase):
|
|||
self.plugin.testing = True
|
||||
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