test: add helpers methods muteLogging and unmuteLogging
This commit is contained in:
parent
cdff2852b4
commit
8bc634d4c2
1 changed files with 34 additions and 23 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue