def test_deprecation_notice(dd_run_check): check = Win32EventLogCheck('win32_event_log', {}, [common.INSTANCE]) dd_run_check(check) assert ( 'This version of the check is deprecated and will be removed in a future release. ' 'Set `legacy_mode` to `false` and read about the latest options, such as `query`.' ) in check.get_warnings()
def new_check(): return lambda instance, init_config=None: Win32EventLogCheck( 'win32_event_log', init_config or {}, [instance])
def check(): check = Win32EventLogCheck('win32_event_log', {}, [INSTANCE]) return check
def test_basic_check(aggregator): check = Win32EventLogCheck('win32_event_log', {}, [common.INSTANCE]) check.check(common.INSTANCE) # First run just initialises timestamp check.check(common.INSTANCE)
def test_check(): check = Win32EventLogCheck('win32_event_log', {}, [INSTANCE]) with pytest.raises(NotImplementedError): check.check(INSTANCE)