summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2012-12-17 23:25:48 -0800
committerChris McDonough <chrism@plope.com>2012-12-17 23:25:48 -0800
commit3d71f047c5cdbbff75d58669bf4bcbc1dd5e18f8 (patch)
tree7e8e4dcd41bb21069b60a9f58f23d6c165ed1b7c /docs
parent60eb090f768f48ff70b38e1846b0a6612e597f5a (diff)
parent2a98712048133353392b9e725a24499acd48d605 (diff)
downloadpyramid-3d71f047c5cdbbff75d58669bf4bcbc1dd5e18f8.tar.gz
pyramid-3d71f047c5cdbbff75d58669bf4bcbc1dd5e18f8.tar.bz2
pyramid-3d71f047c5cdbbff75d58669bf4bcbc1dd5e18f8.zip
Merge pull request #741 from ppaez/zodb-tutorial-fixes
Fix functional tests in the ZODB tutorial
Diffstat (limited to 'docs')
-rw-r--r--docs/tutorials/wiki/src/tests/tutorial/tests.py2
-rw-r--r--docs/tutorials/wiki/tests.rst9
2 files changed, 6 insertions, 5 deletions
diff --git a/docs/tutorials/wiki/src/tests/tutorial/tests.py b/docs/tutorials/wiki/src/tests/tutorial/tests.py
index ff7ca4f33..c435a4519 100644
--- a/docs/tutorials/wiki/src/tests/tutorial/tests.py
+++ b/docs/tutorials/wiki/src/tests/tutorial/tests.py
@@ -143,7 +143,7 @@ class FunctionalTests(unittest.TestCase):
'pyramid.includes': ['pyramid_zodbconn', 'pyramid_tm'] }
app = main({}, **settings)
- self.db = app.registry.zodb_database
+ self.db = app.registry._zodb_databases['']
from webtest import TestApp
self.testapp = TestApp(app)
diff --git a/docs/tutorials/wiki/tests.rst b/docs/tutorials/wiki/tests.rst
index 46d009d0f..7a019dd04 100644
--- a/docs/tutorials/wiki/tests.rst
+++ b/docs/tutorials/wiki/tests.rst
@@ -17,8 +17,8 @@ We write tests for the model classes and the appmaker. Changing
``tests.py``, we'll write a separate test class for each model class, and
we'll write a test class for the ``appmaker``.
-To do so, we'll retain the ``tutorial.tests.ViewTests`` class provided as a
-result of the ``zodb`` project generator. We'll add three test
+To do so, we'll retain the ``tutorial.tests.ViewTests`` class that was
+generated as part of the ``zodb`` scaffold. We'll add three test
classes: one for the ``Page`` model named ``PageModelTests``, one for the
``Wiki`` model named ``WikiModelTests``, and one for the appmaker named
``AppmakerTests``.
@@ -51,8 +51,8 @@ below:
:linenos:
:language: python
-Run the Tests
-=============
+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
@@ -63,6 +63,7 @@ Change the ``requires`` list in ``setup.py`` to include ``WebTest``.
:linenos:
:language: python
:lines: 9-19
+ :emphasize-lines: 10
After we've added a dependency on WebTest in ``setup.py``, we need to rerun
``setup.py develop`` to get WebTest installed into our virtualenv. Assuming