diff --git a/inventory_provider/routes/classifier.py b/inventory_provider/routes/classifier.py index 9f8f6915cb2fcf5141757131d2a8d0867c416724..0d66e89e4b3da1af595967f812a3d0026ebee137 100644 --- a/inventory_provider/routes/classifier.py +++ b/inventory_provider/routes/classifier.py @@ -44,6 +44,7 @@ def get_trap_metadata(source_equipment, interface): return Response(result, mimetype="application/json") + @routes.route("/peer-info/<address>", methods=['GET', 'POST']) @common.require_accepts_json def peer_info(address): diff --git a/test/test_classifier_routes.py b/test/test_classifier_routes.py index e1fd53530a23b2d208284a2d3d7510302e335452..bd783d52c388d2a18caa352ed4b697ec50da014e 100644 --- a/test/test_classifier_routes.py +++ b/test/test_classifier_routes.py @@ -85,7 +85,7 @@ def test_peer_info(client_with_mocked_data, peer_address, peer_type): rv = client_with_mocked_data.get( '/classifier/peer-info/%s' % peer_address, - headers = DEFAULT_REQUEST_HEADERS) + headers=DEFAULT_REQUEST_HEADERS) assert rv.status_code == 200 assert rv.is_json response_data = json.loads(rv.data.decode('utf-8')) @@ -101,5 +101,5 @@ def test_peer_not_found(client_with_mocked_data): rv = client_with_mocked_data.get( '/classifier/peer-info/1.2.3.4.5', - headers = DEFAULT_REQUEST_HEADERS) + headers=DEFAULT_REQUEST_HEADERS) assert rv.status_code == 404