Revision 0dff1e21
[#1667] Préparation compatibilité Python 3
Change-Id: I6d31beff11682430369cc19faedee49019b28ac0
Refs: #1667
vigiboard/tests/functional/test_search_form_host.py | ||
---|---|---|
5 | 5 |
""" |
6 | 6 |
Teste le formulaire de recherche avec un nom d'hôte. |
7 | 7 |
""" |
8 |
from __future__ import print_function |
|
8 | 9 |
from nose.tools import assert_true, assert_equal |
9 | 10 |
from datetime import datetime |
10 | 11 |
import transaction |
... | ... | |
99 | 100 |
|
100 | 101 |
# Il doit y avoir 1 seule ligne de résultats. |
101 | 102 |
rows = self.get_rows(response) |
102 |
print "There are %d rows in the result set" % len(rows)
|
|
103 |
print("There are %d rows in the result set" % len(rows))
|
|
103 | 104 |
assert_equal(len(rows), 1) |
104 | 105 |
|
105 | 106 |
# Il doit y avoir plusieurs colonnes dans la ligne de résultats. |
106 | 107 |
cols = self.get_cells(response) |
107 |
print "There are %d columns in the result set" % len(cols)
|
|
108 |
print("There are %d columns in the result set" % len(cols))
|
|
108 | 109 |
assert_true(len(cols) > 1) |
109 | 110 |
|
110 | 111 |
def test_search_inexistent_host(self): |
... | ... | |
117 | 118 |
|
118 | 119 |
# Il doit y avoir 1 seule ligne de résultats. |
119 | 120 |
rows = self.get_rows(response) |
120 |
print "There are %d rows in the result set" % len(rows)
|
|
121 |
print("There are %d rows in the result set" % len(rows))
|
|
121 | 122 |
assert_equal(len(rows), 1) |
122 | 123 |
|
123 | 124 |
# Il doit y avoir 1 seule colonne dans la ligne de résultats. |
124 | 125 |
# (la colonne contient le texte "Il n'y a aucun événément", traduit) |
125 | 126 |
cols = self.get_cells(response) |
126 |
print "There are %d columns in the result set" % len(cols)
|
|
127 |
print("There are %d columns in the result set" % len(cols))
|
|
127 | 128 |
assert_equal(len(cols), 1) |
128 | 129 |
|
129 | 130 |
def test_search_host_when_disallowed(self): |
... | ... | |
141 | 142 |
|
142 | 143 |
# Il doit y avoir 1 seule ligne de résultats. |
143 | 144 |
rows = self.get_rows(response) |
144 |
print "There are %d rows in the result set" % len(rows)
|
|
145 |
print("There are %d rows in the result set" % len(rows))
|
|
145 | 146 |
assert_equal(len(rows), 1) |
146 | 147 |
|
147 | 148 |
# Il doit y avoir 1 seule colonne dans la ligne de résultats. |
148 | 149 |
# (la colonne contient le texte "Il n'y a aucun événément", traduit) |
149 | 150 |
cols = self.get_cells(response) |
150 |
print "There are %d columns in the result set" % len(cols)
|
|
151 |
print("There are %d columns in the result set" % len(cols))
|
|
151 | 152 |
assert_equal(len(cols), 1) |
Also available in: Unified diff