diff options
| author | pjenvey <devnull@localhost> | 2007-01-31 10:04:47 +0000 |
|---|---|---|
| committer | pjenvey <devnull@localhost> | 2007-01-31 10:04:47 +0000 |
| commit | 0031e486f3b546c783b2fa3d8cbbfe3faf6b4154 (patch) | |
| tree | 1a4b65f3752889cb326df41f14a3120fc6582f06 /tests | |
| parent | b392c8e8c9867e30fdda774b997990ad230b2a8c (diff) | |
| download | paste-0031e486f3b546c783b2fa3d8cbbfe3faf6b4154.tar.gz | |
ensure UnicodeMultiDict allows non basestring keys to pass through
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_multidict.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_multidict.py b/tests/test_multidict.py index 8e4f25e..75933a5 100644 --- a/tests/test_multidict.py +++ b/tests/test_multidict.py @@ -47,6 +47,10 @@ def test_dict(): d['x'] = 'x test' assert dcopy != d + d[(1, None)] = (None, 1) + assert d.items() == [('a', 1), ('z', []), ('y', 6), ('x', 'x test'), + ((1, None), (None, 1))] + def test_unicode_dict(): _test_unicode_dict() _test_unicode_dict(decode_param_names=True) @@ -132,6 +136,13 @@ def _test_unicode_dict(decode_param_names=False): d['x'] = 'x test' assert dcopy != d + d[(1, None)] = (None, 1) + assert d.items() == [('a', u'a test'), ('y', u'y test'), ('x', u'x test'), + ((1, None), (None, 1))] + item = d.items()[-1] + assert isinstance(item[0], tuple) + assert isinstance(item[1], tuple) + fs = cgi.FieldStorage() fs.name = 'thefile' fs.filename = 'hello.txt' |
