def setup(test): # includes setting up mim with patch_middleware_config({"stats.sample_rate": 1, "stats.debug_line_length": 1000}), patch( "timermiddleware.log.isEnabledFor", return_value=True ): # can't set this via logging configuration since setUp() will load a logging config and then start using it before we have a good place to tweak it test.setUp() tmw_log = logging.getLogger("timermiddleware") tmw_log.disabled = 0 # gets disabled when .ini file is loaded; dumb. tmw_log.setLevel(logging.DEBUG)
def setup(test): # includes setting up mim with patch_middleware_config({'stats.sample_rate': 1, 'stats.debug_line_length': 1000, }), \ patch('timermiddleware.log.isEnabledFor', return_value=True): # can't set this via logging configuration since setUp() will load a logging config and then start using it before we have a good place to tweak it test.setUp() tmw_log = logging.getLogger('timermiddleware') tmw_log.disabled = 0 # gets disabled when .ini file is loaded; dumb. tmw_log.setLevel(logging.DEBUG)
def setUp(self): with td.patch_middleware_config({'force_ssl.pattern': '^/auth'}): super(TestRootWithSSLPattern, self).setUp()
def setUp(self): with td.patch_middleware_config({'force_ssl.pattern': '^/auth'}): super(TestRootWithSSLPattern, self).setUp()