Commit 9fe583fc authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review

Merge "Use assertIn and assertNotIn"

parents 3c9a7794 92a08f12
......@@ -36,8 +36,8 @@ class ApiV2HostHeadersTest(ApiV2TestCase):
self.assertEqual('application/json', response.content_type)
# Check the host request header url
self.assertTrue('http://testhost.com/zones/' in
response.json_body['links']['self'])
self.assertIn('http://testhost.com/zones/',
response.json_body['links']['self'])
# Get zone with host header
response = self.client.get('/zones/',
......@@ -48,5 +48,5 @@ class ApiV2HostHeadersTest(ApiV2TestCase):
self.assertEqual('application/json', response.content_type)
# Check the host request header url
self.assertTrue('http://testhost.com/zones' in
response.json_body['links']['self'])
self.assertIn('http://testhost.com/zones',
response.json_body['links']['self'])
......@@ -89,7 +89,7 @@ class KeystoneContextMiddlewareTest(oslotest.base.BaseTestCase):
self.app(self.request)
self.assertFalse('all_tenants' in self.request.params)
self.assertNotIn('all_tenants', self.request.params)
self.assertTrue(self.ctxt.all_tenants)
def test_all_tenants_in_params(self):
......@@ -101,7 +101,7 @@ class KeystoneContextMiddlewareTest(oslotest.base.BaseTestCase):
self.app(self.request)
self.assertFalse('all_tenants' in self.request.params)
self.assertNotIn('all_tenants', self.request.params)
self.assertTrue(self.ctxt.all_tenants)
def test_all_tenants_not_set(self):
......@@ -122,7 +122,7 @@ class KeystoneContextMiddlewareTest(oslotest.base.BaseTestCase):
self.app(self.request)
self.assertFalse('edit_managed_records' in self.request.params)
self.assertNotIn('edit_managed_records', self.request.params)
self.assertTrue(self.ctxt.edit_managed_records)
def test_edit_managed_records_in_headers(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment