diff options
| author | Bert JW Regeer <bertjw@regeer.org> | 2018-04-05 17:44:08 -0600 |
|---|---|---|
| committer | Bert JW Regeer <bertjw@regeer.org> | 2018-05-18 18:21:49 -0600 |
| commit | 62dbd4554223e4980730c1fb459f5aaf8f946608 (patch) | |
| tree | 55826e7298b8d96bced60b90a6e8550be48dd451 | |
| parent | 21882e4e11a61b9ec639407adb0f67784d2b50b3 (diff) | |
| download | pyramid-62dbd4554223e4980730c1fb459f5aaf8f946608.tar.gz pyramid-62dbd4554223e4980730c1fb459f5aaf8f946608.tar.bz2 pyramid-62dbd4554223e4980730c1fb459f5aaf8f946608.zip | |
Add failing test for MIMEAccept in httpexceptions
| -rw-r--r-- | pyramid/tests/test_httpexceptions.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pyramid/tests/test_httpexceptions.py b/pyramid/tests/test_httpexceptions.py index e2d463008..ed6c41e0e 100644 --- a/pyramid/tests/test_httpexceptions.py +++ b/pyramid/tests/test_httpexceptions.py @@ -283,6 +283,17 @@ class TestHTTPException(unittest.TestCase): if header[0] == 'Content-Type': self.assertEqual(header[1], 'application/json') + def test__content_type_invalid(self): + cls = self._getTargetSubclass() + exc = cls() + environ = _makeEnviron() + environ['HTTP_ACCEPT'] = 'invalid' + start_response = DummyStartResponse() + exc(environ, start_response) + for header in start_response.headerlist: + if header[0] == 'Content-Type': + self.assertEqual(header[1], 'text/html; charset=UTF-8') + def test__default_app_iter_with_comment_ampersand(self): cls = self._getTargetSubclass() exc = cls(comment='comment & comment') |
