Revision 0dff1e21
[#1667] Préparation compatibilité Python 3
Change-Id: I6d31beff11682430369cc19faedee49019b28ac0
Refs: #1667
vigiboard/tests/functional/test_correvents_table.py | ||
---|---|---|
7 | 7 |
Test du tableau d'événements de Vigiboard |
8 | 8 |
""" |
9 | 9 |
|
10 |
from __future__ import absolute_import |
|
10 |
from __future__ import absolute_import, print_function
|
|
11 | 11 |
|
12 | 12 |
from nose.tools import assert_true, assert_equal |
13 | 13 |
|
... | ... | |
38 | 38 |
|
39 | 39 |
# Il doit y avoir 2 lignes de résultats. |
40 | 40 |
rows = self.get_rows(response) |
41 |
print "There are %d rows in the result set" % len(rows)
|
|
41 |
print("There are %d rows in the result set" % len(rows))
|
|
42 | 42 |
assert_equal(len(rows), 2) |
43 | 43 |
|
44 | 44 |
# Il doit y avoir plusieurs colonnes dans la ligne de résultats. |
45 | 45 |
cols = self.get_cells(response) |
46 |
print "There are %d columns in the result set" % len(cols)
|
|
46 |
print("There are %d columns in the result set" % len(cols))
|
|
47 | 47 |
assert_true(len(cols) > 1) |
48 | 48 |
|
49 | 49 |
# Mêmes vérifications pour le CSV. |
... | ... | |
60 | 60 |
|
61 | 61 |
# Il doit y avoir 5 lignes de résultats. |
62 | 62 |
rows = self.get_rows(response) |
63 |
print "There are %d rows in the result set" % len(rows)
|
|
63 |
print("There are %d rows in the result set" % len(rows))
|
|
64 | 64 |
assert_equal(len(rows), 5) |
65 | 65 |
|
66 | 66 |
# Il doit y avoir plusieurs colonnes dans la ligne de résultats. |
67 | 67 |
cols = self.get_cells(response) |
68 |
print "There are %d columns in the result set" % len(cols)
|
|
68 |
print("There are %d columns in the result set" % len(cols))
|
|
69 | 69 |
assert_true(len(cols) > 1) |
70 | 70 |
|
71 | 71 |
# Mêmes vérifications pour le CSV. |
... | ... | |
82 | 82 |
|
83 | 83 |
# Il doit y avoir 5 lignes de résultats. |
84 | 84 |
rows = self.get_rows(response) |
85 |
print "There are %d rows in the result set" % len(rows)
|
|
85 |
print("There are %d rows in the result set" % len(rows))
|
|
86 | 86 |
assert_equal(len(rows), 5) |
87 | 87 |
|
88 | 88 |
# Il doit y avoir plusieurs colonnes dans la ligne de résultats. |
89 | 89 |
cols = self.get_cells(response) |
90 |
print "There are %d columns in the result set" % len(cols)
|
|
90 |
print("There are %d columns in the result set" % len(cols))
|
|
91 | 91 |
assert_true(len(cols) > 1) |
92 | 92 |
|
93 | 93 |
# Mêmes vérifications pour le CSV. |
... | ... | |
123 | 123 |
|
124 | 124 |
# Il doit y avoir 1 ligne de résultats. |
125 | 125 |
rows = self.get_rows(response) |
126 |
print "There are %d rows in the result set" % len(rows)
|
|
126 |
print("There are %d rows in the result set" % len(rows))
|
|
127 | 127 |
assert_equal(len(rows), 1) |
128 | 128 |
|
129 | 129 |
# L'utilisateur fait partie du groupe 'managers' |
... | ... | |
134 | 134 |
|
135 | 135 |
# Il doit y avoir 1 ligne de résultats. |
136 | 136 |
rows = self.get_rows(response) |
137 |
print "There are %d rows in the result set" % len(rows)
|
|
137 |
print("There are %d rows in the result set" % len(rows))
|
|
138 | 138 |
assert_equal(len(rows), 1) |
139 | 139 |
|
140 | 140 |
def test_correvents_table_for_host(self): |
... | ... | |
163 | 163 |
|
164 | 164 |
# Il doit y avoir 1 ligne de résultats. |
165 | 165 |
rows = self.get_rows(response) |
166 |
print "There are %d rows in the result set" % len(rows)
|
|
166 |
print("There are %d rows in the result set" % len(rows))
|
|
167 | 167 |
assert_equal(len(rows), 1) |
168 | 168 |
|
169 | 169 |
# L'utilisateur fait partie du groupe 'managers'. |
... | ... | |
174 | 174 |
|
175 | 175 |
# Il doit y avoir 1 ligne de résultats. |
176 | 176 |
rows = self.get_rows(response) |
177 |
print "There are %d rows in the result set" % len(rows)
|
|
177 |
print("There are %d rows in the result set" % len(rows))
|
|
178 | 178 |
assert_equal(len(rows), 1) |
Also available in: Unified diff