Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_init_called_twice(mocker):
""" test cf_logging.init can be called only once """
framework = mocker.Mock(Framework)
cf_logging._SETUP_DONE = False
cf_logging.init(framework, level=logging.DEBUG)
cf_logging.init(framework, level=logging.DEBUG)
def _set_up_sanic_logging(app, level=logging.DEBUG):
cf_logging._SETUP_DONE = False
sanic_logging.init(app, level)
def test_init_called_twice(mocker):
""" test cf_logging.init can be called only once """
framework = mocker.Mock(Framework)
cf_logging._SETUP_DONE = False
cf_logging.init(framework, level=logging.DEBUG)
cf_logging.init(framework, level=logging.DEBUG)
def _set_up_falcon_logging(app, *args):
cf_logging._SETUP_DONE = False
falcon_logging.init(app, logging.DEBUG, *args)
def before_each():
""" reset logging framework """
cf_logging._SETUP_DONE = False