test: add helpers methods muteLogging and unmuteLogging

This commit is contained in:
souliane 2016-03-11 16:41:44 +01:00
commit 8bc634d4c2

View file

@ -21,8 +21,6 @@ from sat.core.i18n import _
from sat.test import helpers
from twisted.trial import unittest
import traceback
from sat.core.log import getLogger
from logging import INFO
from constants import Const
from xml.dom import minidom
@ -205,11 +203,9 @@ class MemoryTest(unittest.TestCase):
@param security_limit: -1 means no security, 0 is the maximum security then the higher the less secure
@param app: name of the frontend registering the parameters
"""
logger = getLogger()
level = logger.getEffectiveLevel()
logger.setLevel(INFO)
helpers.muteLogging()
self.host.memory.paramsRegisterApp(xml, security_limit, app)
logger.setLevel(level)
helpers.unmuteLogging()
# tests with no security level on the parameter (most secure)
params = self._getParamXML()