summaryrefslogtreecommitdiff
path: root/tests/test_static.py
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2019-12-15 20:53:52 -0600
committerMichael Merickel <michael@merickel.org>2019-12-15 20:53:52 -0600
commit497e667e41b83193d7c5a4f74e9419320d755c46 (patch)
tree49233985ecdc3e0caa4699768a81eed97c171b0a /tests/test_static.py
parent08933ad17a230792a886020e06725e44522974d4 (diff)
downloadpyramid-497e667e41b83193d7c5a4f74e9419320d755c46.tar.gz
pyramid-497e667e41b83193d7c5a4f74e9419320d755c46.tar.bz2
pyramid-497e667e41b83193d7c5a4f74e9419320d755c46.zip
fix failing test
Diffstat (limited to 'tests/test_static.py')
-rw-r--r--tests/test_static.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/test_static.py b/tests/test_static.py
index 2933e4310..7b6e74a64 100644
--- a/tests/test_static.py
+++ b/tests/test_static.py
@@ -494,16 +494,15 @@ class Test_static_view_content_encodings(unittest.TestCase):
def test_call_for_unencoded_variant_with_only_encoded_variant_no_accept(
self,
):
+ from pyramid.httpexceptions import HTTPNotFound
+
inst = self._makeOne(
'tests:fixtures/static', content_encodings=['gzip']
)
request = self._makeRequest({'PATH_INFO': '/only_encoded.html'})
context = DummyContext()
- res = inst(context, request)
- self.assertNotIn('Vary', res.headers)
- self.assertNotIn('Content-Encoding', res.headers)
- self.assertEqual(len(res.body), 187)
+ self.assertRaises(HTTPNotFound, lambda: inst(context, request))
def test_call_for_unencoded_variant_with_only_encoded_variant_with_accept(
self,