Project

General

Profile

Revision 77b7746d

ID77b7746d287c14989e0f03272d0ce2cea3fb77e7
Parent 24097891
Child ded8142d

Added by Francois POIROTTE over 7 years ago

[#1543] Compatibilité avec TurboGears 2.3.x

Change-Id: Ic87889229488dbc0f47b267bbd933e7b9f2ce5be
Refs: #1543

View differences:

vigigraph/tests/functional/test_fullhostpage.py
7 7
permettant d'afficher tous les graphes
8 8
associés à un hôte.
9 9
"""
10
import transaction, urllib2
10
import transaction
11
import urllib
11 12

  
12 13
from vigigraph.tests import TestController
13 14
from vigilo.models.session import DBSession
......
40 41
            if hosts[host]:
41 42
                response = self.app.get(
42 43
                    '/rpc/fullHostPage?host=%s' %
43
                        urllib2.quote(host.encode('utf-8')),
44
                        urllib.quote_plus(host.encode('utf-8')),
44 45
                    extra_environ={"REMOTE_USER": user}
45 46
                )
46 47
                index = int(host[4])
47 48
                self.assertTrue(
48 49
                    '/vigirrd/%s/index?graphtemplate=%s' % (
49
                        urllib2.quote((u'host%d éà' % index).encode('utf-8')),
50
                        urllib2.quote((u'graph%d éà' % index).encode('utf-8')),
50
                        urllib.quote((u'host%d éà' % index).encode('utf-8')),
51
                        urllib.quote_plus((u'graph%d éà' % index).encode('utf-8')),
51 52
                    ) in response.unicode_body
52 53
                )
53 54
            else:
54 55
                response = self.app.get(
55 56
                    '/rpc/fullHostPage?host=%s' %
56
                        urllib2.quote(host.encode('utf-8')),
57
                        urllib.quote_plus(host.encode('utf-8')),
57 58
                    extra_environ={"REMOTE_USER": user},
58 59
                    status = 403
59 60
                )
......
90 91
        for host in (u'host1 éà', u'host2 éà', u'host3 éà'):
91 92
            self.app.get(
92 93
                '/rpc/fullHostPage?host=%s' %
93
                    urllib2.quote(host.encode('utf-8'), ''),
94
                    urllib.quote_plus(host.encode('utf-8'), ''),
94 95
                status=401
95 96
            )
96 97

  

Also available in: Unified diff