summaryrefslogtreecommitdiff
path: root/docs/quick_tutorial/cookiecutters/cc_starter
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2020-01-03 23:14:26 -0600
committerGitHub <noreply@github.com>2020-01-03 23:14:26 -0600
commit148cf5138638ce6b1b92b4e13fe1444df9451e34 (patch)
tree7b088836b570b401caf510f130f144404cb19ca4 /docs/quick_tutorial/cookiecutters/cc_starter
parentcc396692d82441f8142fb14041542ebd2dad6f0a (diff)
parentb349c2ba948148d2f5441308c6646f624100b364 (diff)
downloadpyramid-148cf5138638ce6b1b92b4e13fe1444df9451e34.tar.gz
pyramid-148cf5138638ce6b1b92b4e13fe1444df9451e34.tar.bz2
pyramid-148cf5138638ce6b1b92b4e13fe1444df9451e34.zip
Merge pull request #3556 from stevepiercy/docs-synch-cookiecutter-pr-71
Update docs to sync with cookiecutter master branch
Diffstat (limited to 'docs/quick_tutorial/cookiecutters/cc_starter')
-rw-r--r--docs/quick_tutorial/cookiecutters/cc_starter/tests.py29
-rw-r--r--docs/quick_tutorial/cookiecutters/cc_starter/views/default.py2
-rw-r--r--docs/quick_tutorial/cookiecutters/cc_starter/views/notfound.py2
3 files changed, 2 insertions, 31 deletions
diff --git a/docs/quick_tutorial/cookiecutters/cc_starter/tests.py b/docs/quick_tutorial/cookiecutters/cc_starter/tests.py
deleted file mode 100644
index f3886be84..000000000
--- a/docs/quick_tutorial/cookiecutters/cc_starter/tests.py
+++ /dev/null
@@ -1,29 +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'], 'cc_starter')
-
-
-class FunctionalTests(unittest.TestCase):
- def setUp(self):
- from cc_starter 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)
diff --git a/docs/quick_tutorial/cookiecutters/cc_starter/views/default.py b/docs/quick_tutorial/cookiecutters/cc_starter/views/default.py
index 47af359b5..21c30e0b2 100644
--- a/docs/quick_tutorial/cookiecutters/cc_starter/views/default.py
+++ b/docs/quick_tutorial/cookiecutters/cc_starter/views/default.py
@@ -1,6 +1,6 @@
from pyramid.view import view_config
-@view_config(route_name='home', renderer='../templates/mytemplate.jinja2')
+@view_config(route_name='home', renderer='cc_starter:templates/mytemplate.jinja2')
def my_view(request):
return {'project': 'cc_starter'}
diff --git a/docs/quick_tutorial/cookiecutters/cc_starter/views/notfound.py b/docs/quick_tutorial/cookiecutters/cc_starter/views/notfound.py
index 69d6e2804..e8b8f26f3 100644
--- a/docs/quick_tutorial/cookiecutters/cc_starter/views/notfound.py
+++ b/docs/quick_tutorial/cookiecutters/cc_starter/views/notfound.py
@@ -1,7 +1,7 @@
from pyramid.view import notfound_view_config
-@notfound_view_config(renderer='../templates/404.jinja2')
+@notfound_view_config(renderer='cc_starter:templates/404.jinja2')
def notfound_view(request):
request.response.status = 404
return {}