Modify use of assertTrue(A in B)

Developers should use assertIn(A, B) instead of assertTrue(A in B ).

TrivialFix

Change-Id: Iae5f990574a4198178de238138731df90d27063b
This commit is contained in:
Bin Zhou
2016-09-02 12:01:27 +08:00
parent f628849d38
commit f3fbebdba6

View File

@@ -33,7 +33,7 @@ class TestConsolesNovaClient(base.ClientTestBase):
output, 'Type')
self.assertEqual(expected_response_type, console_type, output)
except exceptions.CommandFailed as cf:
self.assertTrue('HTTP 400' in str(cf.stderr))
self.assertIn('HTTP 400', str(cf.stderr))
def _test_vnc_console_get(self):
self._test_console_get('get-vnc-console %s novnc', 'novnc')