diff options
author | Tres Seaver <tseaver@palladion.com> | 2012-12-26 21:47:43 +0000 |
---|---|---|
committer | Tres Seaver <tseaver@palladion.com> | 2012-12-26 21:47:43 +0000 |
commit | 9ad57a92979e74d43b7771a3a15ed85bc8140642 (patch) | |
tree | 169b3a0086a553c7dba76fa8cbcdc289a373c99c | |
parent | 33e47ce03c5bf48e8e16f3055a93c4b53fedc5d6 (diff) | |
download | zope-security-9ad57a92979e74d43b7771a3a15ed85bc8140642.tar.gz |
Fix doctest snippets broken by module rename.
-rw-r--r-- | docs/api/checker.rst | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/api/checker.rst b/docs/api/checker.rst index 06603aa..8b321db 100644 --- a/docs/api/checker.rst +++ b/docs/api/checker.rst @@ -16,8 +16,8 @@ defined for the module: .. doctest:: >>> from zope.security.checker import moduleChecker - >>> from zope.security.tests import test_directives - >>> moduleChecker(test_directives) is None + >>> from zope.security.tests import test_zcml_functest + >>> moduleChecker(test_zcml_functest) is None True We can add a checker using :func:`zope.security.metaconfigure.protectModule`: @@ -31,7 +31,7 @@ We can add a checker using :func:`zope.security.metaconfigure.protectModule`: >>> TEST_PERM = 'zope.security.metaconfigure.test' >>> perm = Permission(TEST_PERM, '') >>> provideUtility(perm, IPermission, TEST_PERM) - >>> protectModule(test_directives, 'foo', TEST_PERM) + >>> protectModule(test_zcml_functest, 'foo', TEST_PERM) Now, the checker should exist and have an access dictionary with the name and permission: @@ -41,15 +41,15 @@ name and permission: >>> def pprint(ob, width=70): ... from pprint import PrettyPrinter ... PrettyPrinter(width=width).pprint(ob) - >>> checker = moduleChecker(test_directives) + >>> checker = moduleChecker(test_zcml_functest) >>> cdict = checker.get_permissions >>> pprint(cdict) {'foo': 'zope.security.metaconfigure.test'} If we define additional names, they will be added to the dict: - >>> protectModule(test_directives, 'bar', TEST_PERM) - >>> protectModule(test_directives, 'baz', TEST_PERM) + >>> protectModule(test_zcml_functest, 'bar', TEST_PERM) + >>> protectModule(test_zcml_functest, 'baz', TEST_PERM) >>> pprint(cdict) {'bar': 'zope.security.metaconfigure.test', 'baz': 'zope.security.metaconfigure.test', |