diff --git a/test/test_data_routes.py b/test/test_data_routes.py index bc575f1f3520fecfe4de63e29d03927f75ef97fb..335b511692e6758649a920c3de14f48e1d484529 100644 --- a/test/test_data_routes.py +++ b/test/test_data_routes.py @@ -187,26 +187,24 @@ def test_router_bgp_routes(router, client_with_mocked_data): jsonschema.validate(response, bgp_list_schema) assert response # at least shouldn't be empty -# -# def test_router_debug_data_route(client_with_mocked_data): -# debug_data_schema = { -# "$schema": "http://json-schema.org/draft-07/schema#", -# "type": "object", -# "items": { -# "type": "object", -# "properties": { -# "vrr": {"type": "object"}, -# "bgp": {"type": "array"}, -# "interfaces": {"type": "array"} -# }, -# "required": ["vrr", "bgp", "interfaces"], -# "additionalProperties": False -# } -# } -# -# for router in _routers(client_with_mocked_data): -# rv = client_with_mocked_data.post( -# "/data/debug-dump/" + router, -# headers=DEFAULT_REQUEST_HEADERS) -# response = json.loads(rv.data.decode("utf-8")) -# jsonschema.validate(response, debug_data_schema) + +def test_router_debug_data_route(router, client_with_mocked_data): + """ + not really a test ... just providing coverage of temporary code used + for debugging (should be removed eventually) + + :param router: + :param client_with_mocked_data: + :return: + """ + debug_data_schema = { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "items": {"type": "object"} + } + + rv = client_with_mocked_data.post( + "/data/debug-dump/" + router, + headers=DEFAULT_REQUEST_HEADERS) + response = json.loads(rv.data.decode("utf-8")) + jsonschema.validate(response, debug_data_schema)