Ticket #9089: multidict-tests-r9066.diff
File multidict-tests-r9066.diff, 1.2 KB (added by , 16 years ago) |
---|
-
tests/regressiontests/utils/http.py
1 """ 2 >>> from django.utils.http import urlencode 3 4 >>> urlencode({ 'a': 1, 'b': 2, 'c': 3}) 5 'a=1&c=3&b=2' 6 7 >>> from django.utils.datastructures import MultiValueDict 8 >>> urlencode(MultiValueDict({'name': ['Adrian', 'Simon'], 'position': ['Developer']}), doseq=True) 9 'position=Developer&name=Adrian&name=Simon' 10 >>> urlencode(MultiValueDict({'test': [1, 2, 3]}), doseq=True) 11 'test=1&test=2&test=3' 12 """ -
tests/regressiontests/utils/tests.py
9 9 import timesince 10 10 import datastructures 11 11 import itercompat 12 import http 12 13 from decorators import DecoratorFromMiddlewareTests 13 14 14 15 # We need this because "datastructures" uses sorted() and the tests are run in … … 23 24 'timesince': timesince, 24 25 'datastructures': datastructures, 25 26 'itercompat': itercompat, 27 'http': http, 26 28 } 27 29 28 30 class TestUtilsHtml(TestCase):