diff options
| author | Steve Piercy <web@stevepiercy.com> | 2020-01-01 19:21:59 -0800 |
|---|---|---|
| committer | Steve Piercy <web@stevepiercy.com> | 2020-01-02 23:30:59 -0800 |
| commit | f2320a274a7168916aeb40cdbc094c4911e5e747 (patch) | |
| tree | f04d72661e4a56708d13adf2f0cbcc84b5821225 /docs | |
| parent | dece4d25b136a493dfeeeb516487d4d756bc69e9 (diff) | |
| download | pyramid-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')
| -rw-r--r-- | docs/quick_tutorial/cookiecutters/MANIFEST.in | 3 | ||||
| -rw-r--r-- | docs/quick_tutorial/cookiecutters/cc_starter/tests.py | 39 | ||||
| -rw-r--r-- | docs/quick_tutorial/cookiecutters/pytest.ini | 7 |
3 files changed, 8 insertions, 41 deletions
diff --git a/docs/quick_tutorial/cookiecutters/MANIFEST.in b/docs/quick_tutorial/cookiecutters/MANIFEST.in index 79c7ec16c..4071776f9 100644 --- a/docs/quick_tutorial/cookiecutters/MANIFEST.in +++ b/docs/quick_tutorial/cookiecutters/MANIFEST.in @@ -1,2 +1,5 @@ include *.txt *.ini *.cfg *.rst recursive-include cc_starter *.ico *.png *.css *.gif *.jpg *.pt *.txt *.mak *.mako *.js *.html *.xml *.jinja2 +recursive-include tests * +recursive-exclude * __pycache__ +recursive-exclude * *.py[co] 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) diff --git a/docs/quick_tutorial/cookiecutters/pytest.ini b/docs/quick_tutorial/cookiecutters/pytest.ini index 326c14fbc..515cc3cf0 100644 --- a/docs/quick_tutorial/cookiecutters/pytest.ini +++ b/docs/quick_tutorial/cookiecutters/pytest.ini @@ -1,3 +1,6 @@ [pytest] -testpaths = cc_starter -python_files = test*.py +addopts = --strict + +testpaths = + cc_starter + tests |
