mirror of
https://github.com/sprockets/sprockets.mixins.http.git
synced 2024-11-14 11:19:28 +00:00
Add test for missing content type header
This commit is contained in:
parent
3aef000228
commit
9614b780ec
1 changed files with 15 additions and 0 deletions
15
tests.py
15
tests.py
|
@ -803,3 +803,18 @@ class MixinTestCase(testing.AsyncHTTPTestCase):
|
|||
self.assertEqual(response.headers['Content-Type'],
|
||||
'bar/foo+json')
|
||||
self.assertEqual(response.body['body'], body)
|
||||
|
||||
@testing.gen_test
|
||||
def test_post_without_content_type(self):
|
||||
body = {
|
||||
'foo': 'bar',
|
||||
}
|
||||
response = yield self.mixin.http_fetch(
|
||||
self.get_url('/test'),
|
||||
method='POST',
|
||||
body=body,
|
||||
request_headers={},
|
||||
)
|
||||
self.assertEqual(response.code, 200)
|
||||
self.assertEqual(response.body['headers']['Content-Type'],
|
||||
'application/msgpack')
|
||||
|
|
Loading…
Reference in a new issue