From f2320a274a7168916aeb40cdbc094c4911e5e747 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Wed, 1 Jan 2020 19:21:59 -0800 Subject: Resync quick_tutorial/cookiecutters.rst and related files after moving tests directory --- .../cookiecutters/cc_starter/tests.py | 39 ---------------------- 1 file changed, 39 deletions(-) delete mode 100644 docs/quick_tutorial/cookiecutters/cc_starter/tests.py (limited to 'docs/quick_tutorial/cookiecutters/cc_starter') 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) -- cgit v1.2.3