diff options
author | roboslone <roboslone@yandex-team.ru> | 2016-12-27 07:29:31 +0300 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2016-12-27 14:42:58 -0500 |
commit | 544b2ef29f0f2577912f88cf746ae0ca5877b5f8 (patch) | |
tree | 435ae5667e04463cb7d444c5a30ce18a8c893264 /tests/responses | |
parent | 4701abd56e382bca72d4ff8e0b015948c9ab3feb (diff) | |
download | django-544b2ef29f0f2577912f88cf746ae0ca5877b5f8.tar.gz |
Fixed #27640 -- Fixed HttpResponse's __repr__() without a 'Content-Type' header.
Diffstat (limited to 'tests/responses')
-rw-r--r-- | tests/responses/tests.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/responses/tests.py b/tests/responses/tests.py index 668d5420f0..5dba0e04cb 100644 --- a/tests/responses/tests.py +++ b/tests/responses/tests.py @@ -136,6 +136,11 @@ class HttpResponseTests(SimpleTestCase): expected = '<HttpResponse status_code=201, "text/html; charset=utf-8">' self.assertEqual(repr(response), expected) + def test_repr_no_content_type(self): + response = HttpResponse(status=204) + del response['Content-Type'] + self.assertEqual(repr(response), '<HttpResponse status_code=204>') + def test_wrap_textiowrapper(self): content = "Café :)" r = HttpResponse() |