Utilizes assertIn
Using assertTrue and the 'in' operator to test if an element is in a sequence is too python2.4. Our unit testing framework supports assertIn which was created for these types of tests. Fixes bug #1230028 Change-Id: I8a9147fa9982644067ff45c73e116d88845e47e3
This commit is contained in:
@@ -44,7 +44,7 @@ class PortBindingsTestCase(test_db_plugin.NeutronDbPluginV2TestCase):
|
||||
self.HAS_PORT_FILTER)
|
||||
|
||||
def _check_response_no_portbindings(self, port):
|
||||
self.assertTrue('status' in port)
|
||||
self.assertIn('status', port)
|
||||
self.assertNotIn(portbindings.VIF_TYPE, port)
|
||||
self.assertNotIn(portbindings.CAPABILITIES, port)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user