aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-03-05 13:21:59 +0100
committerMarco Platania <platania@research.att.com>2020-03-05 15:27:02 +0000
commit23f22e8e8ca50c862d1cece31a0a87050685cdd7 (patch)
treec2b8c3b79ecc4efeb84e5ccd1a5e86f5addd7fa5 /test/mocks
parent37fe1c2e88838760a733fbf1129067685ad7a6ea (diff)
Fix Python linting issues in Python scripts
Fixed pylint issues for categories len-as-condition, using-constant-test, undefined-variable and reimported. Change-Id: Idad710958c3ca0ac6da78fb4709da03e5f079b34 Issue-ID: INT-1427 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Diffstat (limited to 'test/mocks')
-rw-r--r--test/mocks/pnfsimulator/netconfsimulator/netconf/netopeer_change_saver.py2
-rw-r--r--test/mocks/pnfsimulator/simulator-cli/tests/test_netconf_simulator.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/test/mocks/pnfsimulator/netconfsimulator/netconf/netopeer_change_saver.py b/test/mocks/pnfsimulator/netconfsimulator/netconf/netopeer_change_saver.py
index 0a9e841d2..92f88463d 100644
--- a/test/mocks/pnfsimulator/netconfsimulator/netconf/netopeer_change_saver.py
+++ b/test/mocks/pnfsimulator/netconfsimulator/netconf/netopeer_change_saver.py
@@ -71,7 +71,7 @@ def send_message(message):
def create_producer(server):
- for i in range(10):
+ for i in range(10): # pylint: disable=W0612
try:
return KafkaProducer(bootstrap_servers=server, value_serializer=lambda v: json.dumps(v).encode('utf-8'))
except Exception:
diff --git a/test/mocks/pnfsimulator/simulator-cli/tests/test_netconf_simulator.py b/test/mocks/pnfsimulator/simulator-cli/tests/test_netconf_simulator.py
index 46ce84623..2b78a1bec 100644
--- a/test/mocks/pnfsimulator/simulator-cli/tests/test_netconf_simulator.py
+++ b/test/mocks/pnfsimulator/simulator-cli/tests/test_netconf_simulator.py
@@ -112,7 +112,7 @@ class TestNetconfSimulatorClient(unittest.TestCase):
client = NetconfSimulatorClient('localhost')
client.logger = logging.getLogger()
- with self.assertRaises(AttributeError) as context:
+ with self.assertRaises(AttributeError) as context: # pylint: disable=W0612
client.get_config(module_name="test")
@patch('cli.netconf_simulator.NetconfSimulatorClient._configure_logger')
@@ -120,7 +120,7 @@ class TestNetconfSimulatorClient(unittest.TestCase):
client = NetconfSimulatorClient('localhost')
client.logger = logging.getLogger()
- with self.assertRaises(AttributeError) as context:
+ with self.assertRaises(AttributeError) as context: # pylint: disable=W0612
client.get_config(container="test")
@patch('cli.netconf_simulator.requests')