summaryrefslogtreecommitdiff
path: root/docs/tutorials
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2016-04-09 14:05:23 -0700
committerSteve Piercy <web@stevepiercy.com>2016-04-09 14:05:23 -0700
commit50642ec0d3705db51564d1511695da53f63ff82b (patch)
treeabeed3400989782bb451bff56b8eab4631a5eeda /docs/tutorials
parent8ab4a84a6ebcaf8e470f67ee7a7d4e8d2ce1eb4f (diff)
downloadpyramid-50642ec0d3705db51564d1511695da53f63ff82b.tar.gz
pyramid-50642ec0d3705db51564d1511695da53f63ff82b.tar.bz2
pyramid-50642ec0d3705db51564d1511695da53f63ff82b.zip
- update wiki2/authorization step
Diffstat (limited to 'docs/tutorials')
-rw-r--r--docs/tutorials/wiki2/authorization.rst2
-rw-r--r--docs/tutorials/wiki2/src/authorization/development.ini4
-rw-r--r--docs/tutorials/wiki2/src/authorization/production.ini4
-rw-r--r--docs/tutorials/wiki2/src/authorization/setup.py23
-rw-r--r--docs/tutorials/wiki2/src/authorization/tutorial/tests.py2
5 files changed, 19 insertions, 16 deletions
diff --git a/docs/tutorials/wiki2/authorization.rst b/docs/tutorials/wiki2/authorization.rst
index 962e2859c..234f40e3b 100644
--- a/docs/tutorials/wiki2/authorization.rst
+++ b/docs/tutorials/wiki2/authorization.rst
@@ -4,7 +4,7 @@
Adding authorization
====================
-In the last chapter we built :term:`authentication` into our wiki2. We also
+In the last chapter we built :term:`authentication` into our wiki. We also
went one step further and used the ``request.user`` object to perform some
explicit :term:`authorization` checks. This is fine for a lot of applications,
but :app:`Pyramid` provides some facilities for cleaning this up and decoupling
diff --git a/docs/tutorials/wiki2/src/authorization/development.ini b/docs/tutorials/wiki2/src/authorization/development.ini
index f3079727e..4a6c9325c 100644
--- a/docs/tutorials/wiki2/src/authorization/development.ini
+++ b/docs/tutorials/wiki2/src/authorization/development.ini
@@ -1,6 +1,6 @@
###
# app configuration
-# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/environment.html
+# http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/environment.html
###
[app:main]
@@ -34,7 +34,7 @@ port = 6543
###
# logging configuration
-# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html
+# http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/logging.html
###
[loggers]
diff --git a/docs/tutorials/wiki2/src/authorization/production.ini b/docs/tutorials/wiki2/src/authorization/production.ini
index 686dba48a..a13a0ca19 100644
--- a/docs/tutorials/wiki2/src/authorization/production.ini
+++ b/docs/tutorials/wiki2/src/authorization/production.ini
@@ -1,6 +1,6 @@
###
# app configuration
-# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/environment.html
+# http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/environment.html
###
[app:main]
@@ -23,7 +23,7 @@ port = 6543
###
# logging configuration
-# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html
+# http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/logging.html
###
[loggers]
diff --git a/docs/tutorials/wiki2/src/authorization/setup.py b/docs/tutorials/wiki2/src/authorization/setup.py
index 57538f2d0..8dca906c8 100644
--- a/docs/tutorials/wiki2/src/authorization/setup.py
+++ b/docs/tutorials/wiki2/src/authorization/setup.py
@@ -21,20 +21,22 @@ requires = [
'waitress',
]
-tests_require = [
- 'WebTest',
-]
+testing_extras = [
+ 'WebTest >= 1.3.1', # py3 compat
+ 'pytest', # includes virtualenv
+ 'pytest-cov',
+ ]
setup(name='tutorial',
version='0.0',
description='tutorial',
long_description=README + '\n\n' + CHANGES,
classifiers=[
- "Programming Language :: Python",
- "Framework :: Pyramid",
- "Topic :: Internet :: WWW/HTTP",
- "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
- ],
+ "Programming Language :: Python",
+ "Framework :: Pyramid",
+ "Topic :: Internet :: WWW/HTTP",
+ "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
+ ],
author='',
author_email='',
url='',
@@ -42,8 +44,9 @@ setup(name='tutorial',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
- test_suite='tutorial',
- tests_require=tests_require,
+ extras_require={
+ 'testing': testing_extras,
+ },
install_requires=requires,
entry_points="""\
[paste.app_factory]
diff --git a/docs/tutorials/wiki2/src/authorization/tutorial/tests.py b/docs/tutorials/wiki2/src/authorization/tutorial/tests.py
index c54945c28..99e95efd3 100644
--- a/docs/tutorials/wiki2/src/authorization/tutorial/tests.py
+++ b/docs/tutorials/wiki2/src/authorization/tutorial/tests.py
@@ -28,7 +28,7 @@ class BaseTest(unittest.TestCase):
self.session = get_tm_session(session_factory, transaction.manager)
def init_database(self):
- from .models import Base
+ from .models.meta import Base
Base.metadata.create_all(self.engine)
def tearDown(self):