diff options
Diffstat (limited to 'docs/quick_tutorial/authentication/tutorial')
| -rw-r--r-- | docs/quick_tutorial/authentication/tutorial/__init__.py | 1 | ||||
| -rw-r--r-- | docs/quick_tutorial/authentication/tutorial/tests.py | 47 |
2 files changed, 1 insertions, 47 deletions
diff --git a/docs/quick_tutorial/authentication/tutorial/__init__.py b/docs/quick_tutorial/authentication/tutorial/__init__.py index 7aa049427..efc09e760 100644 --- a/docs/quick_tutorial/authentication/tutorial/__init__.py +++ b/docs/quick_tutorial/authentication/tutorial/__init__.py @@ -7,6 +7,7 @@ from .security import groupfinder def main(global_config, **settings): config = Configurator(settings=settings) + config.include('pyramid_chameleon') # Security policies authn_policy = AuthTktAuthenticationPolicy( diff --git a/docs/quick_tutorial/authentication/tutorial/tests.py b/docs/quick_tutorial/authentication/tutorial/tests.py deleted file mode 100644 index 6ff554a1e..000000000 --- a/docs/quick_tutorial/authentication/tutorial/tests.py +++ /dev/null @@ -1,47 +0,0 @@ -import unittest - -from pyramid import testing - - -class TutorialViewTests(unittest.TestCase): - def setUp(self): - self.config = testing.setUp() - - def tearDown(self): - testing.tearDown() - - def test_home(self): - from .views import TutorialViews - - request = testing.DummyRequest() - inst = TutorialViews(request) - response = inst.home() - self.assertEqual('Home View', response['name']) - - def test_hello(self): - from .views import TutorialViews - - request = testing.DummyRequest() - inst = TutorialViews(request) - response = inst.hello() - self.assertEqual('Hello View', response['name']) - - -class TutorialFunctionalTests(unittest.TestCase): - def setUp(self): - from tutorial import main - app = main({}) - from webtest import TestApp - - self.testapp = TestApp(app) - - def tearDown(self): - testing.tearDown() - - def test_home(self): - res = self.testapp.get('/', status=200) - self.assertIn(b'<h1>Hi Home View', res.body) - - def test_hello(self): - res = self.testapp.get('/howdy', status=200) - self.assertIn(b'<h1>Hi Hello View', res.body) |
