From 8913461aa9896e00a011693d20a42188766a8348 Mon Sep 17 00:00:00 2001
From: Sean McGinnis <sean.mcginnis@gmail.com>
Date: Wed, 17 Jun 2020 09:36:42 -0500
Subject: [PATCH] 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>
---
 neutron/tests/unit/services/portforwarding/test_pf_plugin.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/neutron/tests/unit/services/portforwarding/test_pf_plugin.py b/neutron/tests/unit/services/portforwarding/test_pf_plugin.py
index 15007d8d50e..e943de664f5 100644
--- a/neutron/tests/unit/services/portforwarding/test_pf_plugin.py
+++ b/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)