Ticket #1141: unit_tests.r1799.patch

File unit_tests.r1799.patch, 2.0 KB (added by freakboy@…, 10 years ago)

Patch to resolve unit test failures in r1799

  • django/utils/datastructures.py

     
    7474        try:
    7575            list_ = dict.__getitem__(self, key)
    7676        except KeyError:
    77             raise MultiValueDictKeyError, "Key %r not found in MultiValueDict %r" % (key, self)
     77            raise MultiValueDictKeyError, "Key %r not found in %r" % (key, self)
    7878        try:
    7979            return list_[-1]
    8080        except IndexError:
  • django/core/formfields.py

     
    9898        must happen after validation because html2python functions aren't
    9999        expected to deal with invalid input.
    100100        """
    101         print "converting for ", self, self.fields
    102101        for field in self.fields:
    103102            field.convert_post_data(new_data)
    104103
  • tests/othertests/httpwrappers.py

     
    88>>> q['foo']
    99Traceback (most recent call last):
    1010...
    11 MultiValueDictKeyError: "Key 'foo' not found in MultiValueDict {}"
     11MultiValueDictKeyError: "Key 'foo' not found in <MultiValueDict: {}>"
    1212
    1313>>> q['something'] = 'bar'
    1414Traceback (most recent call last):
     
    8686>>> q['foo']
    8787Traceback (most recent call last):
    8888...
    89 MultiValueDictKeyError: "Key 'foo' not found in MultiValueDict {}"
     89MultiValueDictKeyError: "Key 'foo' not found in <MultiValueDict: {}>"
    9090
    9191>>> q['name'] = 'john'
    9292
     
    186186>>> q['bar']
    187187Traceback (most recent call last):
    188188...
    189 MultiValueDictKeyError: "Key 'bar' not found in MultiValueDict {'foo': ['bar']}"
     189MultiValueDictKeyError: "Key 'bar' not found in <MultiValueDict: {'foo': ['bar']}>"
    190190
    191191>>> q['something'] = 'bar'
    192192Traceback (most recent call last):
Back to Top