diff options
| author | Tom Christie | 2015-02-26 13:25:14 +0000 |
|---|---|---|
| committer | Tom Christie | 2015-02-26 13:25:14 +0000 |
| commit | 4b745eef3a452b79bac0fc2e7703aa0ade6836fb (patch) | |
| tree | 54f930ba6083801cfde741fa56a5e2cd62ab0cb9 /tests | |
| parent | b3956bc591e7bd2c0d1460cdbc2731a372df25a5 (diff) | |
| download | django-rest-framework-4b745eef3a452b79bac0fc2e7703aa0ade6836fb.tar.bz2 | |
Update test for more graceful 1.8 handling of malformed filename encodings
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_parsers.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_parsers.py b/tests/test_parsers.py index 8816065a..a9f32a65 100644 --- a/tests/test_parsers.py +++ b/tests/test_parsers.py @@ -101,9 +101,10 @@ class TestFileUploadParser(TestCase): self.__replace_content_disposition('inline; filename=fallback.txt; filename*=utf-8--ÀĥƦ.txt') filename = parser.get_filename(self.stream, None, self.parser_context) - # Malformed. Either None or 'fallback.txt' will be acceptable. + + # Malformed. Either None, 'ÀĥƦ.txt' or 'fallback.txt' will be acceptable. # See also https://code.djangoproject.com/ticket/24209 - self.assertIn(filename, ('fallback.txt', None)) + self.assertIn(filename, ('fallback.txt', 'ÀĥƦ.txt', None)) def __replace_content_disposition(self, disposition): self.parser_context['request'].META['HTTP_CONTENT_DISPOSITION'] = disposition |
