Browse Source

Refactor assertEqual statement that includes 'True'

We have a hacking check to make sure assertTrue is used instead of
assertEqual(True, something). The regex used for that likely needs to be
fixed as it's overly complex for what it is trying to match.

We are seeing pep8 failures flagging an instance of assertEqual that is
comparing a tuple that happens to contain True as one of its values. As
an easier path to get around this failure until someone can reevaluate
the hacking check regex, this just reformats the test code so that it no
longer gets matched by the existing regex.

Change-Id: If2d2554f3509d3da7a6b625fd900d2090a3fe0f2
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
changes/42/736242/1
Sean McGinnis 1 year ago
parent
commit
8913461aa9
No known key found for this signature in database GPG Key ID: CE7EE4BFAF8D70C8
  1. 3
      neutron/tests/unit/services/portforwarding/test_pf_plugin.py

3
neutron/tests/unit/services/portforwarding/test_pf_plugin.py

@ -438,5 +438,6 @@ class TestPortForwardingPlugin(testlib_api.SqlTestCase):
mock_config_opts_get.side_effect = cfg.NoSuchOptError('test_svc_plug')
plugins, rpc_required = pf_plugin._required_service_plugins()
mock_config_opts_get.assert_called_once()
expected = (['router'], True)
self.assertEqual(
(['router'], True), (plugins, rpc_required), description)
expected, (plugins, rpc_required), description)
Loading…
Cancel
Save