def test_service_checks(test_input, expected): requests.Session.get = create_dummy_session_get(test_input[1]) consul = Service.consul_utils.Consul('', '', '', '') actual_output = consul.service_checks(test_input[0]) verifier = expected['method'] assert verifier(actual_output, expected['output_file'])
def test_datacenter(test_input, expected): requests.Session.get = create_dummy_session_get(test_input) consul = Service.consul_utils.Consul('', '', '', '') actual_output = consul.datacenter() verifier = expected['method'] assert verifier(actual_output, expected['output'])