From 3aa4917c7cc54255e22c0cd1c73081c94c656236 Mon Sep 17 00:00:00 2001 From: Erik Reid <erik.reid@geant.org> Date: Tue, 2 Mar 2021 15:21:48 +0100 Subject: [PATCH] pep8 --- test/test_worker_utils.py | 95 +-------------------------------------- 1 file changed, 1 insertion(+), 94 deletions(-) diff --git a/test/test_worker_utils.py b/test/test_worker_utils.py index c164421f..198bc43b 100644 --- a/test/test_worker_utils.py +++ b/test/test_worker_utils.py @@ -12,6 +12,7 @@ from inventory_provider.tasks import worker from inventory_provider.tasks import common from inventory_provider.routes import msr + def backend_db(): return common._get_redis({ 'redis': { @@ -88,100 +89,6 @@ def test_build_juniper_peering_db(mocked_worker_module): :param mocked_worker_module: fixture """ - - # same as inventory_provider.juniper.PEERING_LIST_SCHEMA, - # but with "hostname" in every returned record - - # LOGICAL_SYSTEM_PEERING_SCHEMA = { - # "type": "object", - # "properties": { - # "logical-system": {"type": "string"}, - # "group": {"type": "string"}, - # "description": {"type": "string"}, - # "address": {"type": "string"}, - # "remote-asn": {"type": "integer"}, - # "local-asn": {"type": "integer"}, - # "hostname": {"type": "string"} - # }, - # # local/remote-asn and/or description are not always present, - # # just based on empirical tests - not a problem - # "required": ["logical-system", "group", "address"], - # "additionalProperties": False - # } - # - # TOP_LEVEL_PEERING_SCHEMA = { - # "type": "object", - # "properties": { - # "group": {"type": "string"}, - # "description": {"type": "string"}, - # "address": {"type": "string"}, - # "remote-asn": {"type": "integer"}, - # "local-asn": {"type": "integer"}, - # "hostname": {"type": "string"} - # }, - # # lots of internal peerings - so maybe no explicit asn's - # "required": ["group", "address"], - # "additionalProperties": False - # } - # - # INSTANCE_PEERING = { - # "type": "object", - # "properties": { - # "instance": {"type": "string"}, - # "group": {"type": "string"}, - # "description": {"type": "string"}, - # "address": {"type": "string"}, - # "remote-asn": {"type": "integer"}, - # "local-asn": {"type": "integer"}, - # "hostname": {"type": "string"} - # }, - # # description and-or local-asn is not always present, - # # just based on empirical tests - not a problem - # "required": ["instance", "group", "address", "remote-asn"], - # "additionalProperties": False - # } - # - # DETAILED_PEERING_LIST_SCHEMA = { - # "$schema": "http://json-schema.org/draft-07/schema#", - # "definitions": { - # "top-level-peering": TOP_LEVEL_PEERING_SCHEMA, - # "instance-peering": INSTANCE_PEERING, - # "logical-system-peering": LOGICAL_SYSTEM_PEERING_SCHEMA, - # "peering": { - # "oneOf": [ - # {"$ref": "#/definitions/top-level-peering"}, - # {"$ref": "#/definitions/instance-peering"}, - # {"$ref": "#/definitions/logical-system-peering"} - # ] - # } - # }, - # "type": "array", - # "items": {"$ref": "#/definitions/peering"} - # } - - # PEERING_LIST_SCHEMA = { - # "$schema": "http://json-schema.org/draft-07/schema#", - # "definitions": { - # "peering": { - # "type": "object", - # "properties": { - # "group": {"type": "string"}, - # "description": {"type": "string"}, - # "address": {"type": "string"}, - # "remote-asn": {"type": "integer"}, - # "local-asn": {"type": "integer"}, - # "instance": {"type": "string"}, - # "logical-system": {"type": "string"}, - # }, - # # lots of internal peerings - so maybe no explicit asn's - # "required": ["group", "address"], - # "additionalProperties": False - # } - # }, - # "type": "array", - # "items": {"$ref": "#/definitions/peering"} - # } - logical_system_peering_list_schema = copy.deepcopy(msr.PEERING_LIST_SCHEMA) logical_system_peering_list_schema[ 'definitions']['peering-instance']['required'].append('logical-system') -- GitLab