comparison src/test/test_plugin_misc_radiocol.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 95dabdb0c799
children b3f383ab39da
comparison
equal deleted inserted replaced
992:f51a1895275c 993:301b342c697a
18 # You should have received a copy of the GNU Affero General Public License 18 # You should have received a copy of the GNU Affero General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>. 19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 20
21 """ Tests for the plugin radiocol """ 21 """ Tests for the plugin radiocol """
22 22
23 from sat.core.i18n import _
24 from sat.core import exceptions 23 from sat.core import exceptions
25 from sat.test import helpers, helpers_plugins 24 from sat.test import helpers, helpers_plugins
26 from sat.plugins import plugin_misc_radiocol as plugin 25 from sat.plugins import plugin_misc_radiocol as plugin
27 from sat.plugins import plugin_misc_room_game as plugin_room_game 26 from sat.plugins import plugin_misc_room_game as plugin_room_game
28 from constants import Const 27 from constants import Const
62 self.plugin.testing = True 61 self.plugin.testing = True
63 self.plugin_0045 = self.host.plugins['XEP-0045'] = helpers_plugins.FakeXEP_0045(self.host) 62 self.plugin_0045 = self.host.plugins['XEP-0045'] = helpers_plugins.FakeXEP_0045(self.host)
64 self.plugin_0249 = self.host.plugins['XEP-0249'] = helpers_plugins.FakeXEP_0249(self.host) 63 self.plugin_0249 = self.host.plugins['XEP-0249'] = helpers_plugins.FakeXEP_0249(self.host)
65 logger = logging.getLogger() 64 logger = logging.getLogger()
66 level = logger.getEffectiveLevel() 65 level = logger.getEffectiveLevel()
67 logger.setLevel(logging.WARNING) # remove info pollution 66 logger.setLevel(logging.WARNING) # remove log.info pollution
68 for profile in Const.PROFILE: 67 for profile in Const.PROFILE:
69 self.host.getClient(profile) # init self.host.profiles[profile] 68 self.host.getClient(profile) # init self.host.profiles[profile]
70 logger.setLevel(level) 69 logger.setLevel(level)
71 self.songs = [] 70 self.songs = []
72 self.playlist = [] 71 self.playlist = []