summaryrefslogtreecommitdiff
path: root/docs/narr
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2020-01-01 21:47:58 -0800
committerSteve Piercy <web@stevepiercy.com>2020-01-02 23:30:59 -0800
commite9fb506204aee7219c7ebf58bfcaf3e84e41e279 (patch)
treea179921135ce35a0f1018c07b2c070f6a757ff11 /docs/narr
parentbd42bcaee1176ee5bb0cc7bf311e8e91070eea88 (diff)
downloadpyramid-e9fb506204aee7219c7ebf58bfcaf3e84e41e279.tar.gz
pyramid-e9fb506204aee7219c7ebf58bfcaf3e84e41e279.tar.bz2
pyramid-e9fb506204aee7219c7ebf58bfcaf3e84e41e279.zip
Add missing description for new test in cookiecutter.
Diffstat (limited to 'docs/narr')
-rw-r--r--docs/narr/testing.rst14
1 files changed, 8 insertions, 6 deletions
diff --git a/docs/narr/testing.rst b/docs/narr/testing.rst
index d89a4d3aa..0fa1e98fd 100644
--- a/docs/narr/testing.rst
+++ b/docs/narr/testing.rst
@@ -403,8 +403,7 @@ function ``my_view`` that returns an HTML body when the root URL is invoked:
:linenos:
:language: python
-The following example functional test demonstrates invoking the above
-:term:`view`:
+The following example functional tests demonstrate invoking the above :term:`view`:
.. literalinclude:: myproject/tests/test_it.py
:linenos:
@@ -412,10 +411,13 @@ The following example functional test demonstrates invoking the above
:language: python
When these tests are run, each test method creates a "real" :term:`WSGI` application using the ``main`` function in your ``myproject.__init__`` module, using :term:`WebTest` to wrap that WSGI application.
-It assigns the result to
-``self.testapp``. In the test named ``test_root``, the ``TestApp``'s ``GET``
-method is used to invoke the root URL. Finally, an assertion is made that the
-returned HTML contains the text ``Pyramid``.
+It assigns the result to ``self.testapp``.
+
+In the test named ``test_root``, the ``TestApp``'s ``GET`` method is used to invoke the root URL.
+An assertion is made that the returned HTML contains the text ``Pyramid``.
+
+In the test named ``test_notfound``, the ``TestApp``'s ``GET`` method is used to invoke a bad URL ``/badurl``.
+An assertion is made that the returned status code in the response is ``404``.
See the :term:`WebTest` documentation for further information about the methods
available to a :class:`webtest.app.TestApp` instance.