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

fixed ref to renamed variable

parent 8aaa6886
No related branches found
No related tags found
No related merge requests found
......@@ -9,8 +9,7 @@ import jsonschema
from inventory_provider.tasks import worker
from inventory_provider.tasks import common
from inventory_provider.routes.msr import LOGICAL_SYSTEM_PEERING_LIST_SCHEMA
from inventory_provider.routes import msr
def backend_db():
return common._get_redis({
......@@ -141,7 +140,7 @@ def test_build_juniper_peering_db(mocked_worker_module):
"additionalProperties": False
}
PEERING_LIST_SCHEMA = {
DETAILED_PEERING_LIST_SCHEMA = {
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"top-level-peering": TOP_LEVEL_PEERING_SCHEMA,
......@@ -194,15 +193,16 @@ def test_build_juniper_peering_db(mocked_worker_module):
assert address == canonical
continue
jsonschema.validate(value, PEERING_LIST_SCHEMA)
jsonschema.validate(value, DETAILED_PEERING_LIST_SCHEMA)
if 'logical-system:' in key:
jsonschema.validate(value, LOGICAL_SYSTEM_PEERING_LIST_SCHEMA)
jsonschema.validate(value, msr.PEERING_LIST_SCHEMA)
m = re.match(r'.*logical-system:(.+)$', key)
assert all(p['logical-system'] == m.group(1) for p in value)
found_logical_system = True
if 'group:' in key:
jsonschema.validate(value, msr.PEERING_LIST_SCHEMA)
m = re.match(r'.*group:(.+)$', key)
assert all(p['group'] == m.group(1) for p in value)
found_group = True
......
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