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

pep8

parent 442f76c9
No related branches found
No related tags found
No related merge requests found
......@@ -275,7 +275,6 @@ def ix_public_peers(netconf_config):
}
# note for enabling vrr data parsing ...
# def fetch_vrr_config(hostname, ssh_params):
#
......
......@@ -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
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'
......@@ -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": {
......
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