diff --git a/inventory_provider/juniper.py b/inventory_provider/juniper.py index 3094781f90b04b42518a7d286b186d4a4f3ae83a..6208546adef774b4b95635174029ceee7014f380 100644 --- a/inventory_provider/juniper.py +++ b/inventory_provider/juniper.py @@ -275,7 +275,6 @@ def ix_public_peers(netconf_config): } - # note for enabling vrr data parsing ... # def fetch_vrr_config(hostname, ssh_params): # diff --git a/test/per_router/test_celery_worker.py b/test/per_router/test_celery_worker.py index f822c5e72623b60ec58fda41d7d28e8cb5f893e9..c943e40af1079e95d4b5d8be07c8be339dcff732 100644 --- a/test/per_router/test_celery_worker.py +++ b/test/per_router/test_celery_worker.py @@ -3,7 +3,6 @@ just checks that the worker methods call the right functions and some data ends up in the right place ... otherwise not very detailed """ import json -import logging import os import re @@ -38,6 +37,7 @@ TEST_DATA_DIRNAME = os.path.realpath(os.path.join( # def get(self, key): # return MockedRedis.db[key].encode('utf-8') + class MockedRedis(object): db = None @@ -75,7 +75,8 @@ class MockedRedis(object): @pytest.fixture -def mocked_worker_module(mocker, data_config, cached_test_data, mocked_netifaces): +def mocked_worker_module( + mocker, data_config, cached_test_data, mocked_netifaces): worker.InventoryTask.config = data_config @@ -95,7 +96,7 @@ def mocked_worker_module(mocker, data_config, cached_test_data, mocked_netifaces 'inventory_provider.juniper.load_config', _mocked_load_juniper_netconf_config) - unused = MockedRedis() # init so that db is initialized + MockedRedis() # create an instances so db is initialized def test_netconf_refresh_config(mocked_worker_module, router): @@ -139,4 +140,3 @@ def test_reload_router_config(mocked_worker_module, router, mocker): worker.reload_router_config(router) assert 'netconf:' + router in MockedRedis.db assert 'snmp-interfaces:' + router in MockedRedis.db - diff --git a/test/per_router/test_juniper_data.py b/test/per_router/test_juniper_data.py index 78f624b429182b3faec751900af44488583fafd9..2574209e2f74c9ea19ee67dab924c7415d415ce1 100644 --- a/test/per_router/test_juniper_data.py +++ b/test/per_router/test_juniper_data.py @@ -1,5 +1,3 @@ -import ast -import netifaces import os import jsonschema @@ -102,7 +100,5 @@ def test_bgp_list(netconf_doc): jsonschema.validate(routes, schema) - - def test_snmp_community_string(mocked_netifaces, netconf_doc): assert juniper.snmp_community_string(netconf_doc) == '0pBiFbD' diff --git a/test/test_ix_public_peers.py b/test/test_ix_public_peers.py index 5b9866cb008b651b17ddc4dc6b6e4f7e5223d10d..75131a9f0c8160b73443f56f9006c57b5571b3e5 100644 --- a/test/test_ix_public_peers.py +++ b/test/test_ix_public_peers.py @@ -28,7 +28,7 @@ def netconf(): def test_ix_public_peers(netconf): schema = { - "$schema": "http://json-schema.org/draft-07/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": {