Ticket #27198: 27198-test.diff

File 27198-test.diff, 686 bytes (added by Tim Graham, 8 years ago)
  • tests/httpwrappers/tests.py

    diff --git a/tests/httpwrappers/tests.py b/tests/httpwrappers/tests.py
    index e220145..8cb3d5f 100644
    a b class QueryDictTests(SimpleTestCase):  
    258258        x.update(y)
    259259        self.assertEqual(x.getlist('a'), ['1', '2', '3', '4'])
    260260
     261    def test_getlist_doesnt_mutate(self):
     262        x = QueryDict("a=1&a=2&b=3")
     263        values = x.getlist('a')
     264        values += x.getlist('b')
     265        self.assertEqual(x.getlist('a'), ['1', '2'])
     266
    261267    def test_non_default_encoding(self):
    262268        """#13572 - QueryDict with a non-default encoding"""
    263269        q = QueryDict(str('cur=%A4'), encoding='iso-8859-15')
Back to Top