def test_load_plugins(): """Test the loading of a built-in plugin.""" conf = {'plugins': ['health check'], 'health check': {'interval': 1234}} assert load(conf) == { CoroTypes.Periodic: { ('health check', 'health_check'): hc_during }, 'state': { 'health check': {} }, 'config': conf, 'timings': { ('health check', 'health_check'): deque([], maxlen=1) } }
def test_load_plugins_blank(): """Test that log_plugins works when no plugins are requested.""" conf = {'plugins': []} assert load(conf) == {'config': conf, 'state': {}, 'timings': {}}