From 665d2ecdff976915a4f2864623d5546d41db7a4c Mon Sep 17 00:00:00 2001 From: Lars Alexander Blumberg Date: Mon, 14 Aug 2017 10:39:00 +0200 Subject: Add functional test for css file Static files were introduced in this tutorial step. As the tutorials emphasise to write tests, this commits adds a test for the static file `app.css` that was introduced with this tutorial step. --- docs/quick_tutorial/static_assets/tutorial/tests.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs/quick_tutorial/static_assets') diff --git a/docs/quick_tutorial/static_assets/tutorial/tests.py b/docs/quick_tutorial/static_assets/tutorial/tests.py index 4381235ec..b560ddf82 100644 --- a/docs/quick_tutorial/static_assets/tutorial/tests.py +++ b/docs/quick_tutorial/static_assets/tutorial/tests.py @@ -42,3 +42,7 @@ class TutorialFunctionalTests(unittest.TestCase): def test_hello(self): res = self.testapp.get('/howdy', status=200) self.assertIn(b'

Hi Hello View', res.body) + + def test_css(self): + res = self.testapp.get('/static/app.css', status=200) + self.assertIn(b'body', res.body) -- cgit v1.2.3 From bcf79f0d2555236b8b70932d30fd76bd15591ba0 Mon Sep 17 00:00:00 2001 From: Chris Shenton Date: Sat, 21 Oct 2017 15:35:25 +0200 Subject: Quick Tutorial: Replace wsgiref with waitress In setup.py add waitress import. In development.ini use waitress. Adjust line number highlighting. Mention that we're using it early in the tutorial. Addresses #2926 --- docs/quick_tutorial/static_assets/development.ini | 4 ++-- docs/quick_tutorial/static_assets/setup.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'docs/quick_tutorial/static_assets') diff --git a/docs/quick_tutorial/static_assets/development.ini b/docs/quick_tutorial/static_assets/development.ini index 7066668bf..78d7479e7 100644 --- a/docs/quick_tutorial/static_assets/development.ini +++ b/docs/quick_tutorial/static_assets/development.ini @@ -5,5 +5,5 @@ pyramid.includes = pyramid_debugtoolbar [server:main] -use = egg:pyramid#wsgiref -port = 6543 +use = egg:waitress#main +listen = localhost:6543 diff --git a/docs/quick_tutorial/static_assets/setup.py b/docs/quick_tutorial/static_assets/setup.py index 2221b72e9..aefa352d4 100644 --- a/docs/quick_tutorial/static_assets/setup.py +++ b/docs/quick_tutorial/static_assets/setup.py @@ -2,6 +2,7 @@ from setuptools import setup requires = [ 'pyramid', + 'waitress', 'pyramid_chameleon' ] -- cgit v1.2.3