Skip to content
Snippets Groups Projects
Commit 1a5861b1 authored by Sam Roberts's avatar Sam Roberts
Browse files

unit tests added, need to fix bug causing error in tests before these are reached

parent ca9888bf
No related branches found
No related tags found
1 merge request!3Feature/reporting 311 add msr asn peers
...@@ -346,3 +346,25 @@ def test_get_vpn_proxy_peerings(client, mocked_redis): ...@@ -346,3 +346,25 @@ def test_get_vpn_proxy_peerings(client, mocked_redis):
response_data = json.loads(rv.data.decode('utf-8')) response_data = json.loads(rv.data.decode('utf-8'))
jsonschema.validate(response_data, VPN_PROXY_LIST_SCHEMA) jsonschema.validate(response_data, VPN_PROXY_LIST_SCHEMA)
assert response_data # test data is non-empty assert response_data # test data is non-empty
@pytest.mark.parametrize('endpoint_variant', [
"", # default, no filter
"/378",
"?group=IAS-NRENS",
"?instance=IAS",
"?group=IAS-NRENS&instance=IAS",
"/378?group=IAS-NRENS",
"/378?instance=IAS",
"/378?group=IAS-NRENS&instance=IAS"
])
def test_get_asn_peers(endpoint_variant, client, mocked_redis):
rv = client.get(
f'/msr/asn-peers{endpoint_variant}',
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, PEERING_LIST_SCHEMA)
assert response_data # test data is non-empty
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment