summaryrefslogtreecommitdiff
path: root/docs/quick_tutorial/cookiecutters/cc_starter
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2020-01-01 19:21:59 -0800
committerSteve Piercy <web@stevepiercy.com>2020-01-02 23:30:59 -0800
commitf2320a274a7168916aeb40cdbc094c4911e5e747 (patch)
treef04d72661e4a56708d13adf2f0cbcc84b5821225 /docs/quick_tutorial/cookiecutters/cc_starter
parentdece4d25b136a493dfeeeb516487d4d756bc69e9 (diff)
downloadpyramid-f2320a274a7168916aeb40cdbc094c4911e5e747.tar.gz
pyramid-f2320a274a7168916aeb40cdbc094c4911e5e747.tar.bz2
pyramid-f2320a274a7168916aeb40cdbc094c4911e5e747.zip
Resync quick_tutorial/cookiecutters.rst and related files after moving tests directory
Diffstat (limited to 'docs/quick_tutorial/cookiecutters/cc_starter')
-rw-r--r--docs/quick_tutorial/cookiecutters/cc_starter/tests.py39
1 files changed, 0 insertions, 39 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 0891a3c51..000000000
--- a/docs/quick_tutorial/cookiecutters/cc_starter/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'], 'cc_starter')
-
- 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 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)
-
- def test_notfound(self):
- res = self.testapp.get('/badurl', status=404)
- self.assertTrue(res.status_code == 404)