diff options
| author | Barry Warsaw | 2017-08-29 14:07:55 +0000 |
|---|---|---|
| committer | Barry Warsaw | 2017-08-29 14:07:55 +0000 |
| commit | de8c204fa40f0c4677a1b73b2ee7e3e86ce93a9c (patch) | |
| tree | 6fd2038427fbb36d8173fe338d277351cd19727b /src/mailman/rest/docs/__init__.py | |
| parent | f847e15407bfbf824236547bdf728a1ae00bd405 (diff) | |
| parent | ae0042a90220119414f61aeb20c6b58bfacb8af2 (diff) | |
| download | mailman-de8c204fa40f0c4677a1b73b2ee7e3e86ce93a9c.tar.gz mailman-de8c204fa40f0c4677a1b73b2ee7e3e86ce93a9c.tar.zst mailman-de8c204fa40f0c4677a1b73b2ee7e3e86ce93a9c.zip | |
Diffstat (limited to 'src/mailman/rest/docs/__init__.py')
| -rw-r--r-- | src/mailman/rest/docs/__init__.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/mailman/rest/docs/__init__.py b/src/mailman/rest/docs/__init__.py index 350a6b83e..671ea38d6 100644 --- a/src/mailman/rest/docs/__init__.py +++ b/src/mailman/rest/docs/__init__.py @@ -19,22 +19,13 @@ import threading +from http import HTTPStatus from http.server import BaseHTTPRequestHandler, HTTPServer from mailman.testing.helpers import wait_for_webservice from mailman.testing.layers import RESTLayer from public import public -# New in Python 3.5. -try: - from http import HTTPStatus -except ImportError: # pragma: nocover - class HTTPStatus: - FORBIDDEN = 403 - NOT_FOUND = 404 - OK = 200 - - # We need a web server to vend non-mailman: urls. class TestableHandler(BaseHTTPRequestHandler): # Be quiet. @@ -78,6 +69,7 @@ class HTTPLayer(RESTLayer): cls._thread.join() +# For flufl.testing -- define this doctest's layer. public(layer=HTTPLayer) |
