diff src/test/test_plugin_misc_room_game.py @ 997:b3f383ab39da

test: configuration/use of new logging system
author Goffi <goffi@goffi.org>
date Mon, 21 Apr 2014 20:04:52 +0200
parents 301b342c697a
children 2308f8405ffb
line wrap: on
line diff
--- a/src/test/test_plugin_misc_room_game.py	Mon Apr 21 19:45:10 2014 +0200
+++ b/src/test/test_plugin_misc_room_game.py	Mon Apr 21 20:04:52 2014 +0200
@@ -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 @@
         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)