summaryrefslogtreecommitdiff
path: root/docs/narr/myproject/tests/test_it.py
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2020-01-08 02:00:20 -0800
committerSteve Piercy <web@stevepiercy.com>2020-01-08 02:00:20 -0800
commit3630b1ebd981a994b83689a6becb9922f1b20f0a (patch)
tree7fe2c695957730bc5251b70761ea3c54c5667b9d /docs/narr/myproject/tests/test_it.py
parent14403a3f6d7cb870aefafa6bfa8999f86aa29c86 (diff)
downloadpyramid-3630b1ebd981a994b83689a6becb9922f1b20f0a.tar.gz
pyramid-3630b1ebd981a994b83689a6becb9922f1b20f0a.tar.bz2
pyramid-3630b1ebd981a994b83689a6becb9922f1b20f0a.zip
sync cookiecutter to starter project `myproject`
Diffstat (limited to 'docs/narr/myproject/tests/test_it.py')
-rw-r--r--docs/narr/myproject/tests/test_it.py39
1 files changed, 0 insertions, 39 deletions
diff --git a/docs/narr/myproject/tests/test_it.py b/docs/narr/myproject/tests/test_it.py
deleted file mode 100644
index b300da34d..000000000
--- a/docs/narr/myproject/tests/test_it.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 myproject.views.default import my_view
- request = testing.DummyRequest()
- info = my_view(request)
- self.assertEqual(info['project'], 'myproject')
-
- def test_notfound_view(self):
- from myproject.views.notfound import notfound_view
- request = testing.DummyRequest()
- info = notfound_view(request)
- self.assertEqual(info, {})
-
-
-class FunctionalTests(unittest.TestCase):
- def setUp(self):
- from myproject 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)