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:
Zhongyue Luo
2013-09-25 10:24:32 +08:00
parent bdddb0bf12
commit bcbb029b1a
8 changed files with 23 additions and 23 deletions

View File

@@ -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)