summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki2/tests.rst
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2016-02-18 02:32:08 -0600
committerMichael Merickel <michael@merickel.org>2016-02-18 02:32:08 -0600
commit66fabb4ac707b5b4289db0094756f1a1af7269cc (patch)
treea66d8ee8f8282a72a5ada4fc5d903486caac6a85 /docs/tutorials/wiki2/tests.rst
parent50e08a743d097616ef7f76c9689833eab215cb94 (diff)
downloadpyramid-66fabb4ac707b5b4289db0094756f1a1af7269cc.tar.gz
pyramid-66fabb4ac707b5b4289db0094756f1a1af7269cc.tar.bz2
pyramid-66fabb4ac707b5b4289db0094756f1a1af7269cc.zip
update tests chapter
Diffstat (limited to 'docs/tutorials/wiki2/tests.rst')
-rw-r--r--docs/tutorials/wiki2/tests.rst43
1 files changed, 13 insertions, 30 deletions
diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst
index a99cd68cc..667550467 100644
--- a/docs/tutorials/wiki2/tests.rst
+++ b/docs/tutorials/wiki2/tests.rst
@@ -43,7 +43,7 @@ Functional tests
We'll test the whole application, covering security aspects that are not
tested in the unit tests, like logging in, logging out, checking that
-the ``viewer`` user cannot add or edit pages, but the ``editor`` user
+the ``basic`` user cannot edit pages it didn't create, but the ``editor`` user
can, and so on.
@@ -65,39 +65,20 @@ follows:
:language: python
-Running the tests
-=================
-
-We can run these tests by using ``setup.py test`` in the same way we did in
-:ref:`running_tests`. However, first we must edit our ``setup.py`` to include
-a dependency on `WebTest
-<http://docs.pylonsproject.org/projects/webtest/en/latest/>`_, which we've used
-in our ``tests.py``. Change the ``requires`` list in ``setup.py`` to include
-``WebTest``.
-
-.. literalinclude:: src/tests/setup.py
- :linenos:
- :language: python
- :lines: 11-22
- :emphasize-lines: 11
+.. note::
-After we've added a dependency on WebTest in ``setup.py``, we need to run
-``setup.py develop`` to get WebTest installed into our virtualenv. Assuming
-our shell's current working directory is the "tutorial" distribution directory:
+ We're utilizing the excellent WebTest_ package to do functional testing
+ of the application. This is defined in the ``tests_require`` section of
+ our ``setup.py``. Any other dependencies needed only for testing purposes
+ can be added there and will be installed automatically when running
+ ``setup.py test``.
-On UNIX:
-
-.. code-block:: bash
- $ $VENV/bin/python setup.py develop
-
-On Windows:
-
-.. code-block:: text
-
- c:\pyramidtut\tutorial> %VENV%\Scripts\python setup.py develop
+Running the tests
+=================
-Once that command has completed successfully, we can run the tests themselves:
+We can run these tests by using ``setup.py test`` in the same way we did in
+:ref:`running_tests`:
On UNIX:
@@ -122,3 +103,5 @@ The expected result should look like the following:
OK
Process finished with exit code 0
+
+.. _webtest: http://docs.pylonsproject.org/projects/webtest/en/latest/