diff options
| author | Barry Warsaw | 2009-05-27 17:44:10 +0200 |
|---|---|---|
| committer | Barry Warsaw | 2009-05-27 17:44:10 +0200 |
| commit | 4cf56226a52d2f5e607b5d4d83e20ae24619a383 (patch) | |
| tree | 6ad22c2fa9b74f40bb5403a5e1357715afc861c4 /src/mailman/rest/docs | |
| parent | cdd4885e9fe6eb074022421433d9be9abf3415b4 (diff) | |
| download | mailman-4cf56226a52d2f5e607b5d4d83e20ae24619a383.tar.gz mailman-4cf56226a52d2f5e607b5d4d83e20ae24619a383.tar.zst mailman-4cf56226a52d2f5e607b5d4d83e20ae24619a383.zip | |
Allow for setting the doctest layer in the doctest package's __init__. If not
given, then SMTPLayer is used by default.
Diffstat (limited to '')
| -rw-r--r-- | src/mailman/rest/docs/__init__.py | 30 | ||||
| -rw-r--r-- | src/mailman/rest/docs/basic.txt | 13 |
2 files changed, 32 insertions, 11 deletions
diff --git a/src/mailman/rest/docs/__init__.py b/src/mailman/rest/docs/__init__.py new file mode 100644 index 000000000..680ff5b47 --- /dev/null +++ b/src/mailman/rest/docs/__init__.py @@ -0,0 +1,30 @@ +# Copyright (C) 2009 by the Free Software Foundation, Inc. +# +# This file is part of GNU Mailman. +# +# GNU Mailman is free software: you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation, either version 3 of the License, or (at your option) +# any later version. +# +# GNU Mailman is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# GNU Mailman. If not, see <http://www.gnu.org/licenses/>. + +"""Doctest layer setup.""" + +from __future__ import absolute_import, unicode_literals + +__metaclass__ = type +__all__ = [ + 'layer', + ] + + + +from mailman.testing.layers import RESTLayer +layer = RESTLayer diff --git a/src/mailman/rest/docs/basic.txt b/src/mailman/rest/docs/basic.txt index 40934ec1f..490db6d11 100644 --- a/src/mailman/rest/docs/basic.txt +++ b/src/mailman/rest/docs/basic.txt @@ -1,12 +1,9 @@ +=========== REST server =========== Mailman exposes a REST HTTP server for administrative control. - >>> from mailman.rest.testing.server import TestableServer - >>> server = TestableServer() - >>> server.start() - The server listens for connections on a configurable host name and port. Because the REST server has full administrative access, it should always be run only on localhost, unless you really know what you're doing. The Mailman @@ -24,7 +21,7 @@ returned. Non-existent links ------------------- +================== when you try to access an admin link that doesn't exist, you get the appropriate HTTP 404 Not Found error. @@ -34,9 +31,3 @@ appropriate HTTP 404 Not Found error. Traceback (most recent call last): ... HTTPError: HTTP Error 404: Not Found - - -Cleanup -------- - - >>> server.stop() |
