diff options
| author | Steve Piercy <web@stevepiercy.com> | 2020-01-01 20:15:20 -0800 |
|---|---|---|
| committer | Steve Piercy <web@stevepiercy.com> | 2020-01-02 23:30:59 -0800 |
| commit | 6175ff659c2523974072b404636911ebb89c2d42 (patch) | |
| tree | ef0f0715f993e5cc63ebb9e8bf3bdd59f85c47e2 /docs/tutorials/wiki/tests.rst | |
| parent | dcdb9168aece7afd03194c11554d4a7e1bc32d06 (diff) | |
| download | pyramid-6175ff659c2523974072b404636911ebb89c2d42.tar.gz pyramid-6175ff659c2523974072b404636911ebb89c2d42.tar.bz2 pyramid-6175ff659c2523974072b404636911ebb89c2d42.zip | |
Resync wiki/*.rst and related files after moving tests directory
Diffstat (limited to 'docs/tutorials/wiki/tests.rst')
| -rw-r--r-- | docs/tutorials/wiki/tests.rst | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/tutorials/wiki/tests.rst b/docs/tutorials/wiki/tests.rst index 9dacc5f96..f710b3b10 100644 --- a/docs/tutorials/wiki/tests.rst +++ b/docs/tutorials/wiki/tests.rst @@ -4,7 +4,7 @@ Adding Tests ============ -We will now add tests for the models and the views and a few functional tests in ``tests.py``. +We will now add tests for the models and the views and a few functional tests in ``tests/test_it.py``. Tests ensure that an application works, and that it continues to work when changes are made in the future. @@ -12,10 +12,9 @@ Test the models =============== We write tests for the ``model`` classes and the ``appmaker``. -Changing ``tests.py``, we will write a separate test class for each ``model`` class +We will modify our ``test_it.py`` file, writing a separate test class for each ``model`` class. We will also write a test class for the ``appmaker``. -To do so, we will retain the ``tutorial.tests.ViewTests`` class that was generated from choosing the ``zodb`` backend option. We will add three test classes, one for each of the following: - the ``Page`` model named ``PageModelTests`` @@ -26,7 +25,7 @@ We will add three test classes, one for each of the following: Test the views ============== -We will modify our ``tests.py`` file, adding tests for each view function that we added previously. +We will modify our ``test_it.py`` file, adding tests for each view function that we added previously. As a result, we will delete the ``ViewTests`` class that the ``zodb`` backend option provided, and add four other test classes: ``ViewWikiTests``, ``ViewPageTests``, ``AddPageTests``, and ``EditPageTests``. These test the ``view_wiki``, ``view_page``, ``add_page``, and ``edit_page`` views. @@ -35,14 +34,15 @@ Functional tests ================ We will test the whole application, covering security aspects that are not tested in the unit tests, such as logging in, logging out, checking that the ``viewer`` user cannot add or edit pages, but the ``editor`` user can, and so on. +As a result we will add two test classes, ``SecurityTests`` and ``FunctionalTests``. -View the results of all our edits to ``tests.py`` -================================================= +View the results of all our edits to ``tests/test_it.py`` +========================================================= -Open the ``tutorial/tests.py`` module, and edit it such that it appears as follows: +Open the ``tests/test_it.py`` module, and edit it such that it appears as follows: -.. literalinclude:: src/tests/tutorial/tests.py +.. literalinclude:: src/tests/tests/test_it.py :linenos: :language: python |
