summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/tutorials/wiki2/src/views/tutorial/tests.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/docs/tutorials/wiki2/src/views/tutorial/tests.py b/docs/tutorials/wiki2/src/views/tutorial/tests.py
index b9797df67..0bc343833 100644
--- a/docs/tutorials/wiki2/src/views/tutorial/tests.py
+++ b/docs/tutorials/wiki2/src/views/tutorial/tests.py
@@ -23,12 +23,15 @@ class ViewWikiTests(unittest.TestCase):
def tearDown(self):
testing.tearDown()
-
- def test_it(self):
+
+ def _callFUT(self, request):
from tutorial.views import view_wiki
- self.config.add_route('view_page', '{pagename}')
+ return view_wiki(request)
+
+ def test_it(self):
+ _registerRoutes(self.config)
request = testing.DummyRequest()
- response = view_wiki(request)
+ response = self._callFUT(request)
self.assertEqual(response.location, 'http://example.com/FrontPage')
class ViewPageTests(unittest.TestCase):