summaryrefslogtreecommitdiff
path: root/src/mailman/rest/docs/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/rest/docs/__init__.py')
-rw-r--r--src/mailman/rest/docs/__init__.py12
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)