summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-07-12 22:23:06 +0000
committerGerrit Code Review <review@openstack.org>2018-07-12 22:23:06 +0000
commit7b850a9f6054ea640e262efc7fa1a843fd3c2b65 (patch)
treeef7a59f27cab65fc11d08bef5d41dd99f2973216
parentbe4a1dd6dd55c3820d0339a2e0ede8031e13ea5c (diff)
parent0f180d8e2ea565e68f73d1e299fea5cc15062c10 (diff)
Merge "Adopt hacking 1.1.0"
-rw-r--r--lower-constraints.txt6
-rw-r--r--neutron/agent/linux/iptables_manager.py1
-rw-r--r--neutron/api/rpc/callbacks/version_manager.py1
-rw-r--r--neutron/conf/agent/common.py1
-rw-r--r--neutron/db/api.py1
-rw-r--r--neutron/extensions/securitygroup.py1
-rw-r--r--neutron/plugins/ml2/db.py1
-rw-r--r--neutron/plugins/ml2/extensions/dns_integration.py1
-rw-r--r--neutron/services/l3_router/service_providers/base.py1
-rw-r--r--neutron/services/segments/db.py1
-rwxr-xr-xneutron/tests/common/agents/ovs_agent.py2
-rwxr-xr-xneutron/tests/functional/agent/linux/bin/ipt_binname.py1
-rw-r--r--neutron/tests/unit/agent/l3/test_router_info.py2
-rw-r--r--neutron/tests/unit/agent/linux/test_iptables_manager.py1
-rw-r--r--neutron/tests/unit/agent/test_securitygroups_rpc.py2
-rw-r--r--neutron/tests/unit/common/test_utils.py4
-rw-r--r--neutron/tests/unit/db/quota/test_driver.py1
-rw-r--r--neutron/tests/unit/hacking/test_checks.py10
-rw-r--r--neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_tunnel.py1
-rw-r--r--neutron/tests/unit/plugins/ml2/test_plugin.py4
-rw-r--r--neutron/tests/unit/services/metering/test_metering_plugin.py4
-rw-r--r--neutron/tests/unit/services/qos/test_qos_plugin.py4
-rw-r--r--neutron/tests/unit/services/trunk/drivers/linuxbridge/agent/test_trunk_plumber.py1
-rw-r--r--neutron/tests/unit/testlib_api.py3
-rw-r--r--test-requirements.txt2
-rw-r--r--tox.ini3
26 files changed, 39 insertions, 21 deletions
diff --git a/lower-constraints.txt b/lower-constraints.txt
index 65ba26e..79a20f3 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -25,13 +25,13 @@ extras==1.0.0
25fasteners==0.7.0 25fasteners==0.7.0
26fixtures==3.0.0 26fixtures==3.0.0
27flake8-import-order==0.12 27flake8-import-order==0.12
28flake8==2.5.5 28flake8==2.6.2
29future==0.16.0 29future==0.16.0
30futurist==1.2.0 30futurist==1.2.0
31gitdb==0.6.4 31gitdb==0.6.4
32GitPython==1.0.1 32GitPython==1.0.1
33greenlet==0.4.10 33greenlet==0.4.10
34hacking==0.12.0 34hacking==1.1.0
35httplib2==0.9.1 35httplib2==0.9.1
36imagesize==0.7.1 36imagesize==0.7.1
37iso8601==0.1.11 37iso8601==0.1.11
@@ -96,7 +96,7 @@ positional==1.2.1
96prettytable==0.7.2 96prettytable==0.7.2
97psutil==3.2.2 97psutil==3.2.2
98pycadf==1.1.0 98pycadf==1.1.0
99pycodestyle==2.3.1 99pycodestyle==2.4.0
100pycparser==2.18 100pycparser==2.18
101pyflakes==0.8.1 101pyflakes==0.8.1
102Pygments==2.2.0 102Pygments==2.2.0
diff --git a/neutron/agent/linux/iptables_manager.py b/neutron/agent/linux/iptables_manager.py
index 01ac80e..15d2708 100644
--- a/neutron/agent/linux/iptables_manager.py
+++ b/neutron/agent/linux/iptables_manager.py
@@ -51,6 +51,7 @@ def get_binary_name():
51 """Grab the name of the binary we're running in.""" 51 """Grab the name of the binary we're running in."""
52 return os.path.basename(sys.argv[0])[:16].replace(' ', '_') 52 return os.path.basename(sys.argv[0])[:16].replace(' ', '_')
53 53
54
54binary_name = get_binary_name() 55binary_name = get_binary_name()
55 56
56# A length of a chain name must be less than or equal to 11 characters. 57# A length of a chain name must be less than or equal to 11 characters.
diff --git a/neutron/api/rpc/callbacks/version_manager.py b/neutron/api/rpc/callbacks/version_manager.py
index 07d8fad..66f5214 100644
--- a/neutron/api/rpc/callbacks/version_manager.py
+++ b/neutron/api/rpc/callbacks/version_manager.py
@@ -233,6 +233,7 @@ class CachedResourceConsumerTracker(object):
233 self._check_expiration() 233 self._check_expiration()
234 self._versions.report() 234 self._versions.report()
235 235
236
236_cached_version_tracker = None 237_cached_version_tracker = None
237 238
238 239
diff --git a/neutron/conf/agent/common.py b/neutron/conf/agent/common.py
index c1b2079..34027f9 100644
--- a/neutron/conf/agent/common.py
+++ b/neutron/conf/agent/common.py
@@ -251,6 +251,7 @@ def setup_conf():
251 conf.register_opts(bind_opts) 251 conf.register_opts(bind_opts)
252 return conf 252 return conf
253 253
254
254# add a logging setup method here for convenience 255# add a logging setup method here for convenience
255setup_logging = config.setup_logging 256setup_logging = config.setup_logging
256 257
diff --git a/neutron/db/api.py b/neutron/db/api.py
index 43497b0..fe94e86 100644
--- a/neutron/db/api.py
+++ b/neutron/db/api.py
@@ -68,6 +68,7 @@ def is_retriable(e):
68 # looking savepoints mangled by deadlocks. see bug/1590298 for details. 68 # looking savepoints mangled by deadlocks. see bug/1590298 for details.
69 return _is_nested_instance(e, db_exc.DBError) and '1305' in str(e) 69 return _is_nested_instance(e, db_exc.DBError) and '1305' in str(e)
70 70
71
71_retry_db_errors = oslo_db_api.wrap_db_retry( 72_retry_db_errors = oslo_db_api.wrap_db_retry(
72 max_retries=MAX_RETRIES, 73 max_retries=MAX_RETRIES,
73 retry_interval=0.1, 74 retry_interval=0.1,
diff --git a/neutron/extensions/securitygroup.py b/neutron/extensions/securitygroup.py
index cc793e1..d2411df 100644
--- a/neutron/extensions/securitygroup.py
+++ b/neutron/extensions/securitygroup.py
@@ -207,6 +207,7 @@ def _validate_name_not_default(data, max_len=db_const.NAME_FIELD_SIZE):
207 if data.lower() == "default": 207 if data.lower() == "default":
208 raise SecurityGroupDefaultAlreadyExists() 208 raise SecurityGroupDefaultAlreadyExists()
209 209
210
210validators.add_validator('name_not_default', _validate_name_not_default) 211validators.add_validator('name_not_default', _validate_name_not_default)
211 212
212sg_supported_protocols = ([None] + list(const.IP_PROTOCOL_MAP.keys())) 213sg_supported_protocols = ([None] + list(const.IP_PROTOCOL_MAP.keys()))
diff --git a/neutron/plugins/ml2/db.py b/neutron/plugins/ml2/db.py
index 7694efb..1e7d9bf 100644
--- a/neutron/plugins/ml2/db.py
+++ b/neutron/plugins/ml2/db.py
@@ -342,4 +342,5 @@ def subscribe():
342 resources.SEGMENT, 342 resources.SEGMENT,
343 events.BEFORE_DELETE) 343 events.BEFORE_DELETE)
344 344
345
345subscribe() 346subscribe()
diff --git a/neutron/plugins/ml2/extensions/dns_integration.py b/neutron/plugins/ml2/extensions/dns_integration.py
index d957718..0b0730e 100644
--- a/neutron/plugins/ml2/extensions/dns_integration.py
+++ b/neutron/plugins/ml2/extensions/dns_integration.py
@@ -531,4 +531,5 @@ def subscribe():
531 _delete_port_in_external_dns_service, resources.PORT, 531 _delete_port_in_external_dns_service, resources.PORT,
532 events.BEFORE_DELETE) 532 events.BEFORE_DELETE)
533 533
534
534subscribe() 535subscribe()
diff --git a/neutron/services/l3_router/service_providers/base.py b/neutron/services/l3_router/service_providers/base.py
index 8d04cfc..519615d 100644
--- a/neutron/services/l3_router/service_providers/base.py
+++ b/neutron/services/l3_router/service_providers/base.py
@@ -31,6 +31,7 @@ class _FeatureFlag(object):
31 raise RuntimeError(_("A driver can't require a feature and not " 31 raise RuntimeError(_("A driver can't require a feature and not "
32 "support it.")) 32 "support it."))
33 33
34
34UNSUPPORTED = _FeatureFlag(supports=False, requires=False) 35UNSUPPORTED = _FeatureFlag(supports=False, requires=False)
35OPTIONAL = _FeatureFlag(supports=True, requires=False) 36OPTIONAL = _FeatureFlag(supports=True, requires=False)
36MANDATORY = _FeatureFlag(supports=True, requires=True) 37MANDATORY = _FeatureFlag(supports=True, requires=True)
diff --git a/neutron/services/segments/db.py b/neutron/services/segments/db.py
index 9d20364..22e247e 100644
--- a/neutron/services/segments/db.py
+++ b/neutron/services/segments/db.py
@@ -321,4 +321,5 @@ def subscribe():
321 resources.NETWORK, 321 resources.NETWORK,
322 events.PRECOMMIT_DELETE) 322 events.PRECOMMIT_DELETE)
323 323
324
324subscribe() 325subscribe()
diff --git a/neutron/tests/common/agents/ovs_agent.py b/neutron/tests/common/agents/ovs_agent.py
index 6fa2bdd..710c3b5 100755
--- a/neutron/tests/common/agents/ovs_agent.py
+++ b/neutron/tests/common/agents/ovs_agent.py
@@ -40,11 +40,13 @@ def get_tunnel_name_full(cls, network_type, local_ip, remote_ip):
40 40
41 return '%s-%s-%s' % (network_type, source_ip_hash, remote_ip_hash) 41 return '%s-%s-%s' % (network_type, source_ip_hash, remote_ip_hash)
42 42
43
43ovs_neutron_agent.OVSNeutronAgent.get_tunnel_name = get_tunnel_name_full 44ovs_neutron_agent.OVSNeutronAgent.get_tunnel_name = get_tunnel_name_full
44 45
45 46
46def main(): 47def main():
47 _main() 48 _main()
48 49
50
49if __name__ == "__main__": 51if __name__ == "__main__":
50 sys.exit(main()) 52 sys.exit(main())
diff --git a/neutron/tests/functional/agent/linux/bin/ipt_binname.py b/neutron/tests/functional/agent/linux/bin/ipt_binname.py
index b41d621..e0d7a4c 100755
--- a/neutron/tests/functional/agent/linux/bin/ipt_binname.py
+++ b/neutron/tests/functional/agent/linux/bin/ipt_binname.py
@@ -31,6 +31,7 @@ def print_binary_name():
31 31
32 print(iptables_manager.binary_name) 32 print(iptables_manager.binary_name)
33 33
34
34if __name__ == "__main__": 35if __name__ == "__main__":
35 if 'spawn' in sys.argv: 36 if 'spawn' in sys.argv:
36 eventlet.spawn(print_binary_name).wait() 37 eventlet.spawn(print_binary_name).wait()
diff --git a/neutron/tests/unit/agent/l3/test_router_info.py b/neutron/tests/unit/agent/l3/test_router_info.py
index 364c114..5c75bbb 100644
--- a/neutron/tests/unit/agent/l3/test_router_info.py
+++ b/neutron/tests/unit/agent/l3/test_router_info.py
@@ -190,7 +190,7 @@ class TestRouterInfo(base.BaseTestCase):
190 {}, **self.ri_kwargs) 190 {}, **self.ri_kwargs)
191 new_mark_ids.pop() 191 new_mark_ids.pop()
192 self.assertEqual(new_mark_ids, new_ri.available_mark_ids) 192 self.assertEqual(new_mark_ids, new_ri.available_mark_ids)
193 self.assertTrue(ri.available_mark_ids != new_ri.available_mark_ids) 193 self.assertNotEqual(ri.available_mark_ids, new_ri.available_mark_ids)
194 194
195 def test_process_delete(self): 195 def test_process_delete(self):
196 ri = router_info.RouterInfo(mock.Mock(), _uuid(), {}, **self.ri_kwargs) 196 ri = router_info.RouterInfo(mock.Mock(), _uuid(), {}, **self.ri_kwargs)
diff --git a/neutron/tests/unit/agent/linux/test_iptables_manager.py b/neutron/tests/unit/agent/linux/test_iptables_manager.py
index e156a64..8049eb8 100644
--- a/neutron/tests/unit/agent/linux/test_iptables_manager.py
+++ b/neutron/tests/unit/agent/linux/test_iptables_manager.py
@@ -362,6 +362,7 @@ def _generate_raw_restore_dump(iptables_args):
362 'COMMIT\n' 362 'COMMIT\n'
363 '# Completed by iptables_manager\n' % iptables_args) 363 '# Completed by iptables_manager\n' % iptables_args)
364 364
365
365MANGLE_DUMP = _generate_mangle_dump(IPTABLES_ARG) 366MANGLE_DUMP = _generate_mangle_dump(IPTABLES_ARG)
366MANGLE_DUMP_V6 = _generate_mangle_dump_v6(IPTABLES_ARG) 367MANGLE_DUMP_V6 = _generate_mangle_dump_v6(IPTABLES_ARG)
367RAW_DUMP = _generate_raw_dump(IPTABLES_ARG) 368RAW_DUMP = _generate_raw_dump(IPTABLES_ARG)
diff --git a/neutron/tests/unit/agent/test_securitygroups_rpc.py b/neutron/tests/unit/agent/test_securitygroups_rpc.py
index d7e9130..5bef722 100644
--- a/neutron/tests/unit/agent/test_securitygroups_rpc.py
+++ b/neutron/tests/unit/agent/test_securitygroups_rpc.py
@@ -1363,9 +1363,9 @@ class SecurityGroupAgentRpcApiTestCase(base.BaseTestCase):
1363 None, security_groups=[]) 1363 None, security_groups=[])
1364 self.assertFalse(self.mock_cast.called) 1364 self.assertFalse(self.mock_cast.called)
1365 1365
1366
1366# Note(nati) bn -> binary_name 1367# Note(nati) bn -> binary_name
1367# id -> device_id 1368# id -> device_id
1368
1369PHYSDEV_MOD = '-m physdev' 1369PHYSDEV_MOD = '-m physdev'
1370PHYSDEV_IS_BRIDGED = '--physdev-is-bridged' 1370PHYSDEV_IS_BRIDGED = '--physdev-is-bridged'
1371 1371
diff --git a/neutron/tests/unit/common/test_utils.py b/neutron/tests/unit/common/test_utils.py
index dec6bc9..41ead62 100644
--- a/neutron/tests/unit/common/test_utils.py
+++ b/neutron/tests/unit/common/test_utils.py
@@ -439,7 +439,7 @@ class TestThrottler(base.BaseTestCase):
439 439
440 def sleep_mock(amount_to_sleep): 440 def sleep_mock(amount_to_sleep):
441 sleep(amount_to_sleep) 441 sleep(amount_to_sleep)
442 self.assertTrue(threshold > amount_to_sleep) 442 self.assertGreater(threshold, amount_to_sleep)
443 443
444 with mock.patch.object(utils.eventlet, "sleep", 444 with mock.patch.object(utils.eventlet, "sleep",
445 side_effect=sleep_mock): 445 side_effect=sleep_mock):
@@ -455,7 +455,7 @@ class TestThrottler(base.BaseTestCase):
455 throttled_func() 455 throttled_func()
456 456
457 self.assertEqual(3, orig_function.call_count) 457 self.assertEqual(3, orig_function.call_count)
458 self.assertTrue(timestamp < lock_with_timer.timestamp) 458 self.assertLess(timestamp, lock_with_timer.timestamp)
459 459
460 def test_method_docstring_is_preserved(self): 460 def test_method_docstring_is_preserved(self):
461 class Klass(object): 461 class Klass(object):
diff --git a/neutron/tests/unit/db/quota/test_driver.py b/neutron/tests/unit/db/quota/test_driver.py
index 3cfd2e0..5350eee 100644
--- a/neutron/tests/unit/db/quota/test_driver.py
+++ b/neutron/tests/unit/db/quota/test_driver.py
@@ -80,6 +80,7 @@ class TestCountableResource(resource.CountableResource):
80 def default(self): 80 def default(self):
81 return self.flag 81 return self.flag
82 82
83
83PROJECT = 'prj_test' 84PROJECT = 'prj_test'
84RESOURCE = 'res_test' 85RESOURCE = 'res_test'
85ALT_RESOURCE = 'res_test_meh' 86ALT_RESOURCE = 'res_test_meh'
diff --git a/neutron/tests/unit/hacking/test_checks.py b/neutron/tests/unit/hacking/test_checks.py
index 8736c4a..63d08c8 100644
--- a/neutron/tests/unit/hacking/test_checks.py
+++ b/neutron/tests/unit/hacking/test_checks.py
@@ -14,8 +14,8 @@ import re
14 14
15from flake8 import engine 15from flake8 import engine
16from hacking.tests import test_doctest as hacking_doctest 16from hacking.tests import test_doctest as hacking_doctest
17import pep8
18import pkg_resources 17import pkg_resources
18import pycodestyle
19import testscenarios 19import testscenarios
20import testtools 20import testtools
21from testtools import content 21from testtools import content
@@ -235,7 +235,7 @@ class HackingTestCase(base.BaseTestCase):
235 235
236# TODO(amotoki): Migrate existing unit tests above to docstring tests. 236# TODO(amotoki): Migrate existing unit tests above to docstring tests.
237# NOTE(amotoki): Is it better to enhance HackingDocTestCase in hacking repo to 237# NOTE(amotoki): Is it better to enhance HackingDocTestCase in hacking repo to
238# pass filename to pep8.Checker so that we can reuse it in this test. 238# pass filename to pycodestyle.Checker so that we can reuse it in this test.
239# I am not sure whether unit test class is public. 239# I am not sure whether unit test class is public.
240 240
241SELFTEST_REGEX = re.compile(r'\b(Okay|N\d{3})(\((\S+)\))?:\s(.*)') 241SELFTEST_REGEX = re.compile(r'\b(Okay|N\d{3})(\((\S+)\))?:\s(.*)')
@@ -249,7 +249,7 @@ class HackingDocTestCase(hacking_doctest.HackingTestCase):
249 249
250 scenarios = file_cases 250 scenarios = file_cases
251 251
252 def test_pep8(self): 252 def test_pycodestyle(self):
253 253
254 # NOTE(jecarey): Add tests marked as off_by_default to enable testing 254 # NOTE(jecarey): Add tests marked as off_by_default to enable testing
255 turn_on = set(['H106']) 255 turn_on = set(['H106'])
@@ -258,8 +258,8 @@ class HackingDocTestCase(hacking_doctest.HackingTestCase):
258 self.options.select = tuple(turn_on) 258 self.options.select = tuple(turn_on)
259 self.options.ignore = ('N530',) 259 self.options.ignore = ('N530',)
260 260
261 report = pep8.BaseReport(self.options) 261 report = pycodestyle.BaseReport(self.options)
262 checker = pep8.Checker(filename=self.filename, lines=self.lines, 262 checker = pycodestyle.Checker(filename=self.filename, lines=self.lines,
263 options=self.options, report=report) 263 options=self.options, report=report)
264 checker.check_all() 264 checker.check_all()
265 self.addDetail('doctest', content.text_content(self.raw)) 265 self.addDetail('doctest', content.text_content(self.raw))
diff --git a/neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_tunnel.py b/neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_tunnel.py
index 32c607c..d0cf4b4 100644
--- a/neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_tunnel.py
+++ b/neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_tunnel.py
@@ -37,6 +37,7 @@ def nonzero(f):
37 else: 37 else:
38 return f.__nonzero__() 38 return f.__nonzero__()
39 39
40
40# Useful global dummy variables. 41# Useful global dummy variables.
41NET_UUID = '3faeebfe-5d37-11e1-a64b-000c29d5f0a7' 42NET_UUID = '3faeebfe-5d37-11e1-a64b-000c29d5f0a7'
42LS_ID = 420 43LS_ID = 420
diff --git a/neutron/tests/unit/plugins/ml2/test_plugin.py b/neutron/tests/unit/plugins/ml2/test_plugin.py
index e43b744..cbe2ed3 100644
--- a/neutron/tests/unit/plugins/ml2/test_plugin.py
+++ b/neutron/tests/unit/plugins/ml2/test_plugin.py
@@ -2035,7 +2035,7 @@ class TestMl2PortBinding(Ml2PluginV2TestCase,
2035 return_value=[]): 2035 return_value=[]):
2036 new_context = plugin._bind_port(context) 2036 new_context = plugin._bind_port(context)
2037 self.assertEqual(mock_port, new_context.original) 2037 self.assertEqual(mock_port, new_context.original)
2038 self.assertFalse(new_context == context) 2038 self.assertNotEqual(new_context, context)
2039 2039
2040 2040
2041class TestMl2PortBindingNoSG(TestMl2PortBinding): 2041class TestMl2PortBindingNoSG(TestMl2PortBinding):
@@ -2829,7 +2829,7 @@ class TestML2Segments(Ml2PluginV2TestCase):
2829 # Assert it is not changed 2829 # Assert it is not changed
2830 self.assertEqual(seg_id, segment[driver_api.SEGMENTATION_ID]) 2830 self.assertEqual(seg_id, segment[driver_api.SEGMENTATION_ID])
2831 else: 2831 else:
2832 self.assertTrue(segment[driver_api.SEGMENTATION_ID] > 0) 2832 self.assertGreater(segment[driver_api.SEGMENTATION_ID], 0)
2833 2833
2834 return segment 2834 return segment
2835 2835
diff --git a/neutron/tests/unit/services/metering/test_metering_plugin.py b/neutron/tests/unit/services/metering/test_metering_plugin.py
index 0447de4..e2dd271 100644
--- a/neutron/tests/unit/services/metering/test_metering_plugin.py
+++ b/neutron/tests/unit/services/metering/test_metering_plugin.py
@@ -292,9 +292,9 @@ class TestMeteringPlugin(test_db_base_plugin_v2.NeutronDbPluginV2TestCase,
292 with self.router(tenant_id=self.tenant_id, set_context=True): 292 with self.router(tenant_id=self.tenant_id, set_context=True):
293 with self.metering_label(tenant_id=self.tenant_id, 293 with self.metering_label(tenant_id=self.tenant_id,
294 set_context=True) as label: 294 set_context=True) as label:
295 l = label['metering_label'] 295 la = label['metering_label']
296 self.mock_uuid.return_value = second_uuid 296 self.mock_uuid.return_value = second_uuid
297 with self.metering_label_rule(l['id']): 297 with self.metering_label_rule(la['id']):
298 self.mock_add_rule.assert_called_with(self.ctx, 298 self.mock_add_rule.assert_called_with(self.ctx,
299 expected_add) 299 expected_add)
300 self._delete('metering-label-rules', second_uuid) 300 self._delete('metering-label-rules', second_uuid)
diff --git a/neutron/tests/unit/services/qos/test_qos_plugin.py b/neutron/tests/unit/services/qos/test_qos_plugin.py
index d6e68e9..aa01f41 100644
--- a/neutron/tests/unit/services/qos/test_qos_plugin.py
+++ b/neutron/tests/unit/services/qos/test_qos_plugin.py
@@ -943,5 +943,5 @@ class TestQosPlugin(base.BaseQosTestCase):
943 action_index = mock_manager.mock_calls.index( 943 action_index = mock_manager.mock_calls.index(
944 get_rule_mock_call) 944 get_rule_mock_call)
945 945
946 self.assertTrue( 946 self.assertLess(
947 action_index < mock_manager.mock_calls.index(driver_mock_call)) 947 action_index, mock_manager.mock_calls.index(driver_mock_call))
diff --git a/neutron/tests/unit/services/trunk/drivers/linuxbridge/agent/test_trunk_plumber.py b/neutron/tests/unit/services/trunk/drivers/linuxbridge/agent/test_trunk_plumber.py
index a10b40d..2701258 100644
--- a/neutron/tests/unit/services/trunk/drivers/linuxbridge/agent/test_trunk_plumber.py
+++ b/neutron/tests/unit/services/trunk/drivers/linuxbridge/agent/test_trunk_plumber.py
@@ -95,6 +95,7 @@ class PlumberTestCase(base.BaseTestCase):
95 'tap47198374-5c'] 95 'tap47198374-5c']
96 self.assertEqual(expected, names) 96 self.assertEqual(expected, names)
97 97
98
98IP_LINK_OUTPUT = """ 99IP_LINK_OUTPUT = """
991: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group 1001: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group
100 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0 101 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0
diff --git a/neutron/tests/unit/testlib_api.py b/neutron/tests/unit/testlib_api.py
index a0fbf10..cb75c05 100644
--- a/neutron/tests/unit/testlib_api.py
+++ b/neutron/tests/unit/testlib_api.py
@@ -308,7 +308,8 @@ class SqlTestCase(BaseSqlTestCase, base.BaseTestCase):
308 308
309 309
310class OpportunisticDBTestMixin(object): 310class OpportunisticDBTestMixin(object):
311 """Mixin that converts a BaseSqlTestCase to use the OpportunisticSqlFixture. 311 """Mixin that converts a BaseSqlTestCase to use the
312 OpportunisticSqlFixture.
312 """ 313 """
313 314
314 SKIP_ON_UNAVAILABLE_DB = not base.bool_from_env('OS_FAIL_ON_MISSING_DEPS') 315 SKIP_ON_UNAVAILABLE_DB = not base.bool_from_env('OS_FAIL_ON_MISSING_DEPS')
diff --git a/test-requirements.txt b/test-requirements.txt
index 1308568..5806b7c 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -1,7 +1,7 @@
1# The order of packages is significant, because pip processes them in the order 1# The order of packages is significant, because pip processes them in the order
2# of appearance. Changing the order has an impact on the overall integration 2# of appearance. Changing the order has an impact on the overall integration
3# process, which may cause wedges in the gate later. 3# process, which may cause wedges in the gate later.
4hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 4hacking>=1.1.0 # Apache-2.0
5 5
6bandit>=1.1.0 # Apache-2.0 6bandit>=1.1.0 # Apache-2.0
7coverage!=4.4,>=4.0 # Apache-2.0 7coverage!=4.4,>=4.0 # Apache-2.0
diff --git a/tox.ini b/tox.ini
index b07ec97..0d996c1 100644
--- a/tox.ini
+++ b/tox.ini
@@ -162,7 +162,8 @@ commands = sphinx-build -W -b linkcheck doc/source doc/build/linkcheck
162# N534 Untranslated exception message 162# N534 Untranslated exception message
163# TODO(amotoki) check the following new rules should be fixed or ignored 163# TODO(amotoki) check the following new rules should be fixed or ignored
164# E731 do not assign a lambda expression, use a def 164# E731 do not assign a lambda expression, use a def
165ignore = E125,E126,E128,E731,H404,H405,N530,N534 165# W504 line break after binary operator
166ignore = E125,E126,E128,E731,H404,H405,N530,N534,W504
166# H106: Don't put vim configuration in source files 167# H106: Don't put vim configuration in source files
167# H203: Use assertIs(Not)None to check for None 168# H203: Use assertIs(Not)None to check for None
168# H204: Use assert(Not)Equal to check for equality 169# H204: Use assert(Not)Equal to check for equality