"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/tests/unit/server/test_keystone_flask.py" between
keystone-16.0.1.tar.gz and keystone-17.0.0.tar.gz

About: OpenStack Keystone (Core Service: Identity) provides an authentication and authorization service for other OpenStack services. Provides a catalog of endpoints for all OpenStack services.
The "Ussuri" series (latest release).

test_keystone_flask.py  (keystone-16.0.1):test_keystone_flask.py  (keystone-17.0.0)
skipping to change at line 773 skipping to change at line 773
super(TestKeystoneFlaskUnrouted404, self).setUp() super(TestKeystoneFlaskUnrouted404, self).setUp()
# unregister the 404 handler we explicitly set in loadapp. This # unregister the 404 handler we explicitly set in loadapp. This
# makes the 404 error fallback to a standard werkzeug handling. # makes the 404 error fallback to a standard werkzeug handling.
self.public_app.app.error_handler_spec[None].pop(404) self.public_app.app.error_handler_spec[None].pop(404)
def test_unrouted_path_is_not_jsonified_404(self): def test_unrouted_path_is_not_jsonified_404(self):
with self.test_client() as c: with self.test_client() as c:
path = '/{unrouted_path}'.format(unrouted_path=uuid.uuid4()) path = '/{unrouted_path}'.format(unrouted_path=uuid.uuid4())
resp = c.get(path, expected_status_code=404) resp = c.get(path, expected_status_code=404)
# Make sure we're emitting a html error # 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 # Ensure the more generic flask/werkzeug 404 response is emitted
self.assertTrue(b'404 Not Found' in resp.data) self.assertTrue(b'404 Not Found' in resp.data)
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)