diff options
| author | Chris McDonough <chrism@plope.com> | 2012-03-14 15:04:56 -0700 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2012-03-14 15:04:56 -0700 |
| commit | 8fac09d9eff38b74db4afe5c007cdc8f9f9b8c31 (patch) | |
| tree | 5c1be20a112ddf0a94dd014b3c31ee59be5e61f6 /docs/tutorials/wiki2/tests.rst | |
| parent | 4d22adc0ea7a53158c1e7e5489cac8d63db80a06 (diff) | |
| parent | c884eea0abeac00fdff6821329c2981caa5c8db4 (diff) | |
| download | pyramid-8fac09d9eff38b74db4afe5c007cdc8f9f9b8c31.tar.gz pyramid-8fac09d9eff38b74db4afe5c007cdc8f9f9b8c31.tar.bz2 pyramid-8fac09d9eff38b74db4afe5c007cdc8f9f9b8c31.zip | |
Merge pull request #485 from ppaez/improve-docs
Improve docs
Diffstat (limited to 'docs/tutorials/wiki2/tests.rst')
| -rw-r--r-- | docs/tutorials/wiki2/tests.rst | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst index 94d97d2d5..86880fb18 100644 --- a/docs/tutorials/wiki2/tests.rst +++ b/docs/tutorials/wiki2/tests.rst @@ -13,9 +13,8 @@ We write a test class for the model class ``Page`` and another test class for the ``initialize_sql`` function. To do so, we'll retain the ``tutorial.tests.ViewTests`` class provided as a -result of the ``alchemy`` scaffold. We'll add two test classes: one for the -``Page`` model named ``PageModelTests``, and one for the ``populate`` script -named ``Test_populate``. +result of the ``alchemy`` scaffold. We'll add a test class named +``PageModelTests`` for the ``Page`` model. Testing the Views ================= @@ -34,18 +33,6 @@ tested in the unit tests, like logging in, logging out, checking that the ``viewer`` user cannot add or edit pages, but the ``editor`` user can, and so on. -We must first modify ``main()`` in ``scripts/populate.py``, adding an -optional ``settings`` argument so we can pass in a URI to a -memory-resident database instead of our disk-based database we've -populated; this allows us to run our tests with a clean database each -time. Replace ``main()`` with this version which adds an argument and -then uses it if set, and creates a ``Model`` for testing: - -.. literalinclude:: src/tests/tutorial/scripts/populate.py - :lines: 24-36 - :linenos: - :language: python - Viewing the results of all our edits to ``tests.py`` ==================================================== |
