diff options
author | Keryn Knight <keryn@kerynknight.com> | 2015-07-13 15:32:09 +0100 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2015-07-15 09:01:25 -0400 |
commit | c96f11257baf43188ff9daeddab3221992925c85 (patch) | |
tree | a984d75839ffc6d174c1dee5d15eade726011fce /tests/responses | |
parent | b356dc4e07915521db1e768d6357e3d982877a6e (diff) | |
download | django-c96f11257baf43188ff9daeddab3221992925c85.tar.gz |
Refs #24121 -- Added meaningful repr() to HttpResponse and subclasses.
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 91ec710c72..a34228ffa7 100644 --- a/tests/responses/tests.py +++ b/tests/responses/tests.py @@ -107,3 +107,8 @@ class HttpResponseTests(SimpleTestCase): response = HttpResponse(iso_content, content_type='text/plain') self.assertContains(response, iso_content) + + def test_repr(self): + response = HttpResponse(content="Café :)".encode(UTF8), status=201) + expected = '<HttpResponse status_code=201, "text/html; charset=utf-8">' + self.assertEqual(repr(response), expected) |