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

pep8 (and fixed merged conflicts)

parent 3f30b089
Branches
Tags
No related merge requests found
"""
@pelle: this module doesn't seem to serve any purpose, except
to wrap calls to influx.write_points (and the DI approach is not used)
... please simplify/remove it
"""
import json import json
import logging import logging
import sys import sys
...@@ -5,7 +10,6 @@ from typing import Callable, Iterable ...@@ -5,7 +10,6 @@ from typing import Callable, Iterable
from urllib.parse import urlparse from urllib.parse import urlparse
from influxdb import InfluxDBClient from influxdb import InfluxDBClient
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
DEFAULT_INFLUX_BATCH_SIZE = 100 DEFAULT_INFLUX_BATCH_SIZE = 100
......
...@@ -304,4 +304,3 @@ def parse_interface_xml(node, struct: dict, defaults=None): ...@@ -304,4 +304,3 @@ def parse_interface_xml(node, struct: dict, defaults=None):
continue continue
result[key] = parsed result[key] = parsed
return result or None return result or None
...@@ -70,14 +70,14 @@ def all_nokia_routers(): ...@@ -70,14 +70,14 @@ def all_nokia_routers():
return NOKIA_ROUTERS return NOKIA_ROUTERS
"""
@pelle: having a fixture that is used only in one place, and in a
separate file from where it is used only decreases readability.
Please move it ... or (to minimize ambiguity) use pytest.mark.parametrize
(this and the one below)
"""
@pytest.fixture(params=JUNIPER_ROUTERS) @pytest.fixture(params=JUNIPER_ROUTERS)
def juniper_router_fqdn(request): def juniper_router_fqdn(request):
"""
@pelle: having a fixture that is used only in one place, and in a
separate file from where it is used only decreases readability.
Please move it ... or (to minimize ambiguity) use pytest.mark.parametrize
(this and the one below)
"""
return request.param return request.param
......
...@@ -19,6 +19,7 @@ from ncclient.operations.rpc import RPCReply ...@@ -19,6 +19,7 @@ from ncclient.operations.rpc import RPCReply
fresh router configs to know if our code breaks fresh router configs to know if our code breaks
""" """
def test_sanity_check_snapshot_data(polled_interfaces, all_juniper_routers): def test_sanity_check_snapshot_data(polled_interfaces, all_juniper_routers):
""" """
verify that all routers with interfaces to be polled verify that all routers with interfaces to be polled
...@@ -522,7 +523,7 @@ def test_prepare_influx_params(input_params, expected): ...@@ -522,7 +523,7 @@ def test_prepare_influx_params(input_params, expected):
@pytest.mark.parametrize( @pytest.mark.parametrize(
"hostname", "hostname",
[ 'rt0.lon.uk.lab.office.geant.net', 'rt0.ams.nl.lab.office.geant.net' ] ['rt0.lon.uk.lab.office.geant.net', 'rt0.ams.nl.lab.office.geant.net']
) )
def test_nokia_counters(hostname): def test_nokia_counters(hostname):
""" """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment