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

added unit test for unknown interface

parent 864e0f16
No related branches found
No related tags found
No related merge requests found
......@@ -140,6 +140,26 @@ def test_juniper_link_info(client):
jsonschema.validate(response_data, JUNIPER_LINK_METADATA)
def test_juniper_link_info_not_found(client):
rv = client.get(
'/classifier/juniper-link-info/'
'mx1.ams.nl.geant.net/unknown-interface-name',
headers=DEFAULT_REQUEST_HEADERS)
assert rv.status_code == 200
assert rv.is_json
response_data = json.loads(rv.data.decode('utf-8'))
jsonschema.validate(response_data, JUNIPER_LINK_METADATA)
assert response_data == {
'interface': {
'name': 'unknown-interface-name',
'description': '',
'ipv4': [],
'ipv6': [],
'bundle': []
}
}
VPN_RR_PEER_INFO_KEYS = {'vpn-rr-peer-info'}
IX_PUBLIC_PEER_INFO_KEYS = {'ix-public-peer-info', 'interfaces'}
......
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