From 0cef6bc5d627524354c47295df7a0aa84a64539e Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Thu, 1 Nov 2018 21:05:04 -0500 Subject: remove deprecated media range support from add_view and add_route --- tests/test_integration.py | 39 --------------------------------------- 1 file changed, 39 deletions(-) (limited to 'tests/test_integration.py') diff --git a/tests/test_integration.py b/tests/test_integration.py index 28160eb7a..d57a7cf6e 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -869,45 +869,6 @@ class AcceptContentTypeTest(unittest.TestCase): ) self.assertEqual(res.content_type, 'text/x-fallback') - def test_deprecated_ranges_in_route_predicate(self): - config = self._makeConfig() - config.add_route('foo', '/foo', accept='text/*') - config.add_view(lambda r: 'OK', route_name='foo', renderer='string') - app = self._makeTestApp(config) - res = app.get( - '/foo', - headers={'Accept': 'application/json; q=1.0, text/plain; q=0.9'}, - status=200, - ) - self.assertEqual(res.content_type, 'text/plain') - self.assertEqual(res.body, b'OK') - res = app.get( - '/foo', headers={'Accept': 'application/json'}, status=404 - ) - self.assertEqual(res.content_type, 'application/json') - - def test_deprecated_ranges_in_view_predicate(self): - config = self._makeConfig() - config.add_route('foo', '/foo') - config.add_view( - lambda r: 'OK', - route_name='foo', - accept='text/*', - renderer='string', - ) - app = self._makeTestApp(config) - res = app.get( - '/foo', - headers={'Accept': 'application/json; q=1.0, text/plain; q=0.9'}, - status=200, - ) - self.assertEqual(res.content_type, 'text/plain') - self.assertEqual(res.body, b'OK') - res = app.get( - '/foo', headers={'Accept': 'application/json'}, status=404 - ) - self.assertEqual(res.content_type, 'application/json') - class DummyContext(object): pass -- cgit v1.2.3