Revision 0dff1e21
[#1667] Préparation compatibilité Python 3
Change-Id: I6d31beff11682430369cc19faedee49019b28ac0
Refs: #1667
vigiboard/tests/functional/test_search_form_misc.py | ||
---|---|---|
5 | 5 |
""" |
6 | 6 |
Teste le formulaire de recherche avec divers champs. |
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 |
from datetime import timedelta |
... | ... | |
94 | 95 |
}, |
95 | 96 |
extra_environ={'REMOTE_USER': 'user'}) |
96 | 97 |
rows = self.get_rows(response) |
97 |
print "There are %d rows in the result set" % len(rows)
|
|
98 |
print("There are %d rows in the result set" % len(rows))
|
|
98 | 99 |
return len(rows) |
99 | 100 |
|
100 | 101 |
def test_search_by_output(self): |
... | ... | |
109 | 110 |
|
110 | 111 |
# Il doit y avoir 1 seule ligne de résultats. |
111 | 112 |
rows = self.get_rows(response) |
112 |
print "There are %d rows in the result set" % len(rows)
|
|
113 |
print("There are %d rows in the result set" % len(rows))
|
|
113 | 114 |
assert_equal(len(rows), 1) |
114 | 115 |
|
115 | 116 |
# Il doit y avoir plusieurs colonnes dans la ligne de résultats. |
116 | 117 |
cols = self.get_cells(response) |
117 |
print "There are %d columns in the result set" % len(cols)
|
|
118 |
print("There are %d columns in the result set" % len(cols))
|
|
118 | 119 |
assert_true(len(cols) > 1) |
119 | 120 |
|
120 | 121 |
def test_search_by_trouble_ticket(self): |
... | ... | |
130 | 131 |
|
131 | 132 |
# Il doit y avoir 1 seule ligne de résultats. |
132 | 133 |
rows = self.get_rows(response) |
133 |
print "There are %d rows in the result set" % len(rows)
|
|
134 |
print("There are %d rows in the result set" % len(rows))
|
|
134 | 135 |
assert_equal(len(rows), 1) |
135 | 136 |
|
136 | 137 |
# Il doit y avoir plusieurs colonnes dans la ligne de résultats. |
137 | 138 |
cols = self.get_cells(response) |
138 |
print "There are %d columns in the result set" % len(cols)
|
|
139 |
print("There are %d columns in the result set" % len(cols))
|
|
139 | 140 |
assert_true(len(cols) > 1) |
140 | 141 |
|
141 | 142 |
def test_search_by_dates(self): |
... | ... | |
158 | 159 |
|
159 | 160 |
# Il doit y avoir 1 seule ligne de résultats. |
160 | 161 |
rows = self.get_rows(response) |
161 |
print "There are %d rows in the result set" % len(rows)
|
|
162 |
print("There are %d rows in the result set" % len(rows))
|
|
162 | 163 |
assert_equal(len(rows), 1) |
163 | 164 |
|
164 | 165 |
# Il doit y avoir plusieurs colonnes dans la ligne de résultats. |
165 | 166 |
cols = self.get_cells(response) |
166 |
print "There are %d columns in the result set" % len(cols)
|
|
167 |
print("There are %d columns in the result set" % len(cols))
|
|
167 | 168 |
assert_true(len(cols) > 1) |
168 | 169 |
|
169 | 170 |
def test_future_begin_date(self): |
Also available in: Unified diff