summaryrefslogtreecommitdiff
path: root/docs/tutorials
diff options
context:
space:
mode:
authorPatricio Paez <pp@pp.com.mx>2012-03-14 18:59:53 -0700
committerPatricio Paez <pp@pp.com.mx>2012-03-14 18:59:53 -0700
commit02e0bb8b10356748a231eab46b331050d44126f9 (patch)
tree5a1a9c60b0479ff155fcbed2a58ca0c100f15655 /docs/tutorials
parentd3941838a61c0dc96bc2b6209bfcfdf77ea6b834 (diff)
downloadpyramid-02e0bb8b10356748a231eab46b331050d44126f9.tar.gz
pyramid-02e0bb8b10356748a231eab46b331050d44126f9.tar.bz2
pyramid-02e0bb8b10356748a231eab46b331050d44126f9.zip
Fixed SQL tutorial functional tests for Python 3
Diffstat (limited to 'docs/tutorials')
-rw-r--r--docs/tutorials/wiki2/src/tests/tutorial/tests.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/docs/tutorials/wiki2/src/tests/tutorial/tests.py b/docs/tutorials/wiki2/src/tests/tutorial/tests.py
index c7b7d884b..659862a09 100644
--- a/docs/tutorials/wiki2/src/tests/tutorial/tests.py
+++ b/docs/tutorials/wiki2/src/tests/tutorial/tests.py
@@ -190,7 +190,7 @@ class FunctionalTests(unittest.TestCase):
def test_FrontPage(self):
res = self.testapp.get('/FrontPage', status=200)
- self.assertTrue('FrontPage' in res.body)
+ self.assertTrue(b'FrontPage' in res.body)
def test_unexisting_page(self):
self.testapp.get('/SomePage', status=404)
@@ -201,48 +201,48 @@ class FunctionalTests(unittest.TestCase):
def test_failed_log_in(self):
res = self.testapp.get(self.viewer_wrong_login, status=200)
- self.assertTrue('login' in res.body)
+ self.assertTrue(b'login' in res.body)
def test_logout_link_present_when_logged_in(self):
self.testapp.get(self.viewer_login, status=302)
res = self.testapp.get('/FrontPage', status=200)
- self.assertTrue('Logout' in res.body)
+ self.assertTrue(b'Logout' in res.body)
def test_logout_link_not_present_after_logged_out(self):
self.testapp.get(self.viewer_login, status=302)
self.testapp.get('/FrontPage', status=200)
res = self.testapp.get('/logout', status=302)
- self.assertTrue('Logout' not in res.body)
+ self.assertTrue(b'Logout' not in res.body)
def test_anonymous_user_cannot_edit(self):
res = self.testapp.get('/FrontPage/edit_page', status=200)
- self.assertTrue('Login' in res.body)
+ self.assertTrue(b'Login' in res.body)
def test_anonymous_user_cannot_add(self):
res = self.testapp.get('/add_page/NewPage', status=200)
- self.assertTrue('Login' in res.body)
+ self.assertTrue(b'Login' in res.body)
def test_viewer_user_cannot_edit(self):
self.testapp.get(self.viewer_login, status=302)
res = self.testapp.get('/FrontPage/edit_page', status=200)
- self.assertTrue('Login' in res.body)
+ self.assertTrue(b'Login' in res.body)
def test_viewer_user_cannot_add(self):
self.testapp.get(self.viewer_login, status=302)
res = self.testapp.get('/add_page/NewPage', status=200)
- self.assertTrue('Login' in res.body)
+ self.assertTrue(b'Login' in res.body)
def test_editors_member_user_can_edit(self):
self.testapp.get(self.editor_login, status=302)
res = self.testapp.get('/FrontPage/edit_page', status=200)
- self.assertTrue('Editing' in res.body)
+ self.assertTrue(b'Editing' in res.body)
def test_editors_member_user_can_add(self):
self.testapp.get(self.editor_login, status=302)
res = self.testapp.get('/add_page/NewPage', status=200)
- self.assertTrue('Editing' in res.body)
+ self.assertTrue(b'Editing' in res.body)
def test_editors_member_user_can_view(self):
self.testapp.get(self.editor_login, status=302)
res = self.testapp.get('/FrontPage', status=200)
- self.assertTrue('FrontPage' in res.body)
+ self.assertTrue(b'FrontPage' in res.body)