Ignore:
Timestamp:
13 Aug 2013, 13:40:01 (11 years ago)
Author:
uli
Message:

Make everything work under Python3.x again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.cas/trunk/waeup/cas/tests/test_server.py

    r10492 r10494  
    55import unittest
    66from paste.deploy import loadapp
    7 from urlparse import parse_qsl
     7try:
     8    from urlparse import parse_qsl         # Python 2.x
     9except ImportError:                        # pragma: no cover
     10    from urllib.parse import parse_qsl     # Python 3.x
    811from webob import Request, Response
    912from webtest import TestApp as WebTestApp  # avoid py.test skip message
     
    569572        url = 'http://sample.com/index?a=1&b=2'
    570573        result1 = update_url('http://sample.com/index?a=1&b=2', dict(b='3'))
    571         assert result1 == 'http://sample.com/index?a=1&b=3'
     574        assert result1 in (
     575            'http://sample.com/index?a=1&b=3',
     576            'http://sample.com/index?b=3&a=1')
    572577        result2 = update_url('http://sample.com/index?b=2', dict(b='3'))
    573578        assert result2 == 'http://sample.com/index?b=3'
     
    575580        assert result3 == 'http://sample.com/index?b=3'
    576581        result4 = update_url('http://sample.com/index?a=2', dict(b='3'))
    577         assert result4 == 'http://sample.com/index?a=2&b=3'
     582        assert result4 in (
     583            'http://sample.com/index?a=2&b=3',
     584            'http://sample.com/index?b=3&a=2')
Note: See TracChangeset for help on using the changeset viewer.