=== modified file 'django/http/__init__.py'
|
|
|
|
| 91 | 91 | self._assert_mutable() |
| 92 | 92 | MultiValueDict.__setitem__(self, key, value) |
| 93 | 93 | |
| | 94 | def __delitem__(self, key): |
| | 95 | self._assert_mutable() |
| | 96 | super(QueryDict, self).__delitem__(key) |
| | 97 | |
| 94 | 98 | def __copy__(self): |
| 95 | 99 | result = self.__class__('', mutable=True) |
| 96 | 100 | for key, value in dict.items(self): |
=== modified file 'tests/regressiontests/httpwrappers/tests.py'
|
|
|
|
| 96 | 96 | >>> q['name'] |
| 97 | 97 | 'john' |
| 98 | 98 | |
| | 99 | >>> del q['name'] |
| | 100 | >>> 'name' in q |
| | 101 | False |
| | 102 | |
| | 103 | >>> q['name'] = 'john' |
| | 104 | |
| 99 | 105 | >>> q.get('foo', 'default') |
| 100 | 106 | 'default' |
| 101 | 107 | |
| … |
… |
|
| 367 | 373 | >>> q.urlencode() |
| 368 | 374 | 'vote=yes&vote=no' |
| 369 | 375 | |
| | 376 | >>> del q['vote'] |
| | 377 | Traceback (most recent call last): |
| | 378 | ... |
| | 379 | AttributeError: This QueryDict instance is immutable |
| | 380 | |
| 370 | 381 | """ |
| 371 | 382 | |
| 372 | 383 | from django.http import QueryDict |