diff options
| author | Michael Merickel <michael@merickel.org> | 2018-11-01 21:05:04 -0500 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2018-11-02 09:54:28 -0500 |
| commit | 0cef6bc5d627524354c47295df7a0aa84a64539e (patch) | |
| tree | 05c3c6163ba096f8aeda882c25e4b405fce4423e /tests/test_integration.py | |
| parent | aa1660f3d9a5dc654a91544d72de596af2fdf9ba (diff) | |
| download | pyramid-0cef6bc5d627524354c47295df7a0aa84a64539e.tar.gz pyramid-0cef6bc5d627524354c47295df7a0aa84a64539e.tar.bz2 pyramid-0cef6bc5d627524354c47295df7a0aa84a64539e.zip | |
remove deprecated media range support from add_view and add_route
Diffstat (limited to 'tests/test_integration.py')
| -rw-r--r-- | tests/test_integration.py | 39 |
1 files changed, 0 insertions, 39 deletions
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 |
