Skip to content
Snippets Groups Projects
Commit 660f6c85 authored by Erik Reid's avatar Erik Reid
Browse files

added meaningless mtc endpoint test

parent 9e318382
No related branches found
No related tags found
No related merge requests found
...@@ -561,7 +561,7 @@ def get_bgp_peer_info(address): ...@@ -561,7 +561,7 @@ def get_bgp_peer_info(address):
return Response(result, mimetype='application/json') return Response(result, mimetype='application/json')
@routes.route("/mtc-element-info/<node>/<interface>", methods=['GET', 'POST']) @routes.route("/mtc-interface-info/<node>/<interface>", methods=['GET', 'POST'])
@common.require_accepts_json @common.require_accepts_json
def get_mtc_interface_info(node, interface): def get_mtc_interface_info(node, interface):
""" """
......
...@@ -3,8 +3,9 @@ import json ...@@ -3,8 +3,9 @@ import json
import jsonschema import jsonschema
import pytest import pytest
from inventory_provider.routes.classifier_schema \ from inventory_provider.routes.classifier_schema import \
import JUNIPER_LINK_RESPONSE_SCHEMA, PEER_INFO_RESPONSE_SCHEMA JUNIPER_LINK_RESPONSE_SCHEMA, PEER_INFO_RESPONSE_SCHEMA, \
MTC_INTERFACE_INFO_RESPONSE_SCHEMA
DEFAULT_REQUEST_HEADERS = { DEFAULT_REQUEST_HEADERS = {
"Content-type": "application/json", "Content-type": "application/json",
...@@ -220,6 +221,17 @@ def test_coriant_info_not_found(client, mocker): ...@@ -220,6 +221,17 @@ def test_coriant_info_not_found(client, mocker):
assert rv.status_code == 404 assert rv.status_code == 404
def test_mtc_info(client):
rv = client.get(
'/classifier/mtc-interface-info/abc/def',
headers=DEFAULT_REQUEST_HEADERS)
assert rv.status_code == 200
assert rv.is_json
response_data = json.loads(rv.data.decode('utf-8'))
# schema seems wrong ...
# jsonschema.validate(response_data, MTC_INTERFACE_INFO_RESPONSE_SCHEMA)
def test_infinera_unparseable_fiberlink(client): def test_infinera_unparseable_fiberlink(client):
rv = client.get( rv = client.get(
'/classifier/infinera-fiberlink-info/unparseableentitystring/aaa', '/classifier/infinera-fiberlink-info/unparseableentitystring/aaa',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment