Skip to content
This repository
Browse code

Merge pull request #487 from ppaez/improve-docs

Fixed SQL tutorial functional tests for Python 3
  • Loading branch information...
commit d90b4373772230cc2f41d97f683947ca8584224c 2 parents d394183 + 02e0bb8
Chris McDonough mcdonc authored

Showing 1 changed file with 11 additions and 11 deletions. Show diff stats Hide diff stats

  1. +11 11 docs/tutorials/wiki2/src/tests/tutorial/tests.py
22 docs/tutorials/wiki2/src/tests/tutorial/tests.py
@@ -190,7 +190,7 @@ def test_root(self):
190 190
191 191 def test_FrontPage(self):
192 192 res = self.testapp.get('/FrontPage', status=200)
193   - self.assertTrue('FrontPage' in res.body)
  193 + self.assertTrue(b'FrontPage' in res.body)
194 194
195 195 def test_unexisting_page(self):
196 196 self.testapp.get('/SomePage', status=404)
@@ -201,48 +201,48 @@ def test_successful_log_in(self):
201 201
202 202 def test_failed_log_in(self):
203 203 res = self.testapp.get(self.viewer_wrong_login, status=200)
204   - self.assertTrue('login' in res.body)
  204 + self.assertTrue(b'login' in res.body)
205 205
206 206 def test_logout_link_present_when_logged_in(self):
207 207 self.testapp.get(self.viewer_login, status=302)
208 208 res = self.testapp.get('/FrontPage', status=200)
209   - self.assertTrue('Logout' in res.body)
  209 + self.assertTrue(b'Logout' in res.body)
210 210
211 211 def test_logout_link_not_present_after_logged_out(self):
212 212 self.testapp.get(self.viewer_login, status=302)
213 213 self.testapp.get('/FrontPage', status=200)
214 214 res = self.testapp.get('/logout', status=302)
215   - self.assertTrue('Logout' not in res.body)
  215 + self.assertTrue(b'Logout' not in res.body)
216 216
217 217 def test_anonymous_user_cannot_edit(self):
218 218 res = self.testapp.get('/FrontPage/edit_page', status=200)
219   - self.assertTrue('Login' in res.body)
  219 + self.assertTrue(b'Login' in res.body)
220 220
221 221 def test_anonymous_user_cannot_add(self):
222 222 res = self.testapp.get('/add_page/NewPage', status=200)
223   - self.assertTrue('Login' in res.body)
  223 + self.assertTrue(b'Login' in res.body)
224 224
225 225 def test_viewer_user_cannot_edit(self):
226 226 self.testapp.get(self.viewer_login, status=302)
227 227 res = self.testapp.get('/FrontPage/edit_page', status=200)
228   - self.assertTrue('Login' in res.body)
  228 + self.assertTrue(b'Login' in res.body)
229 229
230 230 def test_viewer_user_cannot_add(self):
231 231 self.testapp.get(self.viewer_login, status=302)
232 232 res = self.testapp.get('/add_page/NewPage', status=200)
233   - self.assertTrue('Login' in res.body)
  233 + self.assertTrue(b'Login' in res.body)
234 234
235 235 def test_editors_member_user_can_edit(self):
236 236 self.testapp.get(self.editor_login, status=302)
237 237 res = self.testapp.get('/FrontPage/edit_page', status=200)
238   - self.assertTrue('Editing' in res.body)
  238 + self.assertTrue(b'Editing' in res.body)
239 239
240 240 def test_editors_member_user_can_add(self):
241 241 self.testapp.get(self.editor_login, status=302)
242 242 res = self.testapp.get('/add_page/NewPage', status=200)
243   - self.assertTrue('Editing' in res.body)
  243 + self.assertTrue(b'Editing' in res.body)
244 244
245 245 def test_editors_member_user_can_view(self):
246 246 self.testapp.get(self.editor_login, status=302)
247 247 res = self.testapp.get('/FrontPage', status=200)
248   - self.assertTrue('FrontPage' in res.body)
  248 + self.assertTrue(b'FrontPage' in res.body)

0 comments on commit d90b437

Please sign in to comment.
Something went wrong with that request. Please try again.