summaryrefslogtreecommitdiff
path: root/docs/narr/myproject/tests/test_it.py
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2020-01-16 10:09:45 -0600
committerMichael Merickel <michael@merickel.org>2020-01-16 10:09:45 -0600
commita7f61dc1ae95ffddacccfb583fa7a8f6d294f4b9 (patch)
tree8aca99052f7086bcb37609b516d7a11902377d71 /docs/narr/myproject/tests/test_it.py
parenteb7046c8eeb8c9b598260ae8c8976187a8f84953 (diff)
parent9c153e1250e00faa06003c10c3a26886489e6210 (diff)
downloadpyramid-a7f61dc1ae95ffddacccfb583fa7a8f6d294f4b9.tar.gz
pyramid-a7f61dc1ae95ffddacccfb583fa7a8f6d294f4b9.tar.bz2
pyramid-a7f61dc1ae95ffddacccfb583fa7a8f6d294f4b9.zip
Merge branch 'master' into move-acl-security-to-authorization
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)