diff options
| author | Steve Piercy <web@stevepiercy.com> | 2020-01-01 18:16:30 -0800 |
|---|---|---|
| committer | Steve Piercy <web@stevepiercy.com> | 2020-01-02 23:30:59 -0800 |
| commit | 3157775a08ff9e48b0fff8057f4482d78d266f01 (patch) | |
| tree | 09001fb9d768191ab8c73ad77b004c3050139e9b /docs/quick_tour/sessions | |
| parent | 80e9923262fee4892a750d0d6366b193cb4204ba (diff) | |
| download | pyramid-3157775a08ff9e48b0fff8057f4482d78d266f01.tar.gz pyramid-3157775a08ff9e48b0fff8057f4482d78d266f01.tar.bz2 pyramid-3157775a08ff9e48b0fff8057f4482d78d266f01.zip | |
Resync through Quick Tour after moving tests directory, removing tests.py file
Diffstat (limited to 'docs/quick_tour/sessions')
| -rw-r--r-- | docs/quick_tour/sessions/hello_world/tests.py | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/docs/quick_tour/sessions/hello_world/tests.py b/docs/quick_tour/sessions/hello_world/tests.py deleted file mode 100644 index b747e7679..000000000 --- a/docs/quick_tour/sessions/hello_world/tests.py +++ /dev/null @@ -1,39 +0,0 @@ -import unittest - -from pyramid import testing - - -class ViewTests(unittest.TestCase): - def setUp(self): - self.config = testing.setUp() - - def tearDown(self): - testing.tearDown() - - def test_my_view(self): - from .views.default import my_view - request = testing.DummyRequest() - info = my_view(request) - self.assertEqual(info['project'], 'hello_world') - - def test_notfound_view(self): - from .views.notfound import notfound_view - request = testing.DummyRequest() - info = notfound_view(request) - self.assertEqual(info, {}) - - -class FunctionalTests(unittest.TestCase): - def setUp(self): - from hello_world import main - app = main({}) - from webtest import TestApp - self.testapp = TestApp(app) - - def test_root(self): - res = self.testapp.get('/', status=200) - self.assertTrue(b'Pyramid' in res.body) - - def test_notfound(self): - res = self.testapp.get('/badurl', status=404) - self.assertTrue(res.status_code == 404) |
