Check if content-type contains http, not equals
This change modifies the unit test for checking if the response is an html error. Rather than checking for equality, just check that the content type contains text/html. Change-Id: I6953f2404f79d004939d4a4fcd114f11bd83b773
This commit is contained in:
parent
b3cbf60c3c
commit
5544bca8ea
@ -775,6 +775,6 @@ class TestKeystoneFlaskUnrouted404(rest.RestfulTestCase):
|
||||
path = '/{unrouted_path}'.format(unrouted_path=uuid.uuid4())
|
||||
resp = c.get(path, expected_status_code=404)
|
||||
# Make sure we're emitting a html error
|
||||
self.assertEqual('text/html', resp.headers['Content-Type'])
|
||||
self.assertIn('text/html', resp.headers['Content-Type'])
|
||||
# Ensure the more generic flask/werkzeug 404 response is emitted
|
||||
self.assertTrue(b'404 Not Found' in resp.data)
|
||||
|
Loading…
Reference in New Issue
Block a user