summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki2/tests.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/tutorials/wiki2/tests.rst')
-rw-r--r--docs/tutorials/wiki2/tests.rst26
1 files changed, 8 insertions, 18 deletions
diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst
index 64025421f..fe3fdaf2c 100644
--- a/docs/tutorials/wiki2/tests.rst
+++ b/docs/tutorials/wiki2/tests.rst
@@ -11,17 +11,12 @@ is a common practice to put tests into a ``tests`` subpackage, especially as
projects grow in size and complexity. Each module in the test subpackage
should contain tests for its corresponding module in our application. Each
corresponding pair of modules should have the same names, except the test
-module should have the prefix "test_".
+module should have the prefix ``test_``.
We will move parts of ``tests.py`` into appropriate new files in the ``tests``
subpackage, and add several new tests.
-
-Test the models
-===============
-
-To test the model class ``Page``, we'll add a new ``PageModelTests`` class to
-a new file ``tests/test_models.py``
+Start by creating a new directory and a new empty file ``tests/__init__.py``.
Test the views
@@ -47,13 +42,6 @@ can, and so on.
View the results of all our edits to ``tests`` subpackage
=========================================================
-Open ``tutorial/tests/test_models.py``, and edit it such that it appears as
-follows:
-
-.. literalinclude:: src/tests/tutorial/tests/test_models.py
- :linenos:
- :language: python
-
Open ``tutorial/tests/test_views.py``, and edit it such that it appears as
follows:
@@ -61,10 +49,10 @@ follows:
:linenos:
:language: python
-Open ``tutorial/tests/test_.py``, and edit it such that it appears as
+Open ``tutorial/tests/test_functional.py``, and edit it such that it appears as
follows:
-.. literalinclude:: src/tests/tutorial/tests/test_.py
+.. literalinclude:: src/tests/tutorial/tests/test_functional.py
:linenos:
:language: python
@@ -119,8 +107,10 @@ The expected result should look like the following:
.. code-block:: text
- ......................
+ ....................
----------------------------------------------------------------------
- Ran 21 tests in 2.700s
+ Ran 20 tests in 0.524s
OK
+
+ Process finished with exit code 0