Revision 77b7746d
[#1543] Compatibilité avec TurboGears 2.3.x
Change-Id: Ic87889229488dbc0f47b267bbd933e7b9f2ce5be
Refs: #1543
vigigraph/tests/functional/test_opensearch.py | ||
---|---|---|
6 | 6 |
Teste l'utilisation du module de recherche |
7 | 7 |
OpenSearch intégré au navigateur. |
8 | 8 |
""" |
9 |
import transaction, urllib2 |
|
9 |
import transaction |
|
10 |
import urllib |
|
10 | 11 |
|
11 | 12 |
from vigigraph.tests import TestController |
12 | 13 |
from vigilo.models.session import DBSession |
... | ... | |
39 | 40 |
'/rpc/searchHost?query=host*', |
40 | 41 |
extra_environ={"REMOTE_USER": user} |
41 | 42 |
) |
42 |
print repr(response.body) |
|
43 | 43 |
for host in hosts: |
44 | 44 |
if hosts[host]: |
45 | 45 |
self.assertTrue( |
46 | 46 |
u'/rpc/fullHostPage?host=%s' % |
47 |
urllib2.quote(host.encode('utf-8'))
|
|
47 |
urllib.quote_plus(host.encode('utf-8'))
|
|
48 | 48 |
in response.unicode_body |
49 | 49 |
) |
50 | 50 |
else: |
51 | 51 |
self.assertTrue( |
52 | 52 |
u'/rpc/fullHostPage?host=%s' % |
53 |
urllib2.quote(host.encode('utf-8'))
|
|
53 |
urllib.quote_plus(host.encode('utf-8'))
|
|
54 | 54 |
not in response.unicode_body |
55 | 55 |
) |
56 | 56 |
|
... | ... | |
86 | 86 |
for host in (u'host1 éà', u'host2 éà', u'host3 éà'): |
87 | 87 |
self.app.get( |
88 | 88 |
'/rpc/fullHostPage?host=%s' % |
89 |
urllib2.quote(host.encode('utf-8'), ''),
|
|
89 |
urllib.quote_plus(host.encode('utf-8'), ''),
|
|
90 | 90 |
status=401 |
91 | 91 |
) |
92 | 92 |
|
Also available in: Unified diff