Add doctest for cherrypy.lib.httputil.valid_status
@@ -269,6 +269,13 @@ def valid_status(status):
If status has no reason-phrase is supplied, a default reason-
phrase will be provided.
+
+ >>> from six.moves import http_client
+ >>> from six.moves.BaseHTTPServer import BaseHTTPRequestHandler
+ >>> valid_status(http_client.ACCEPTED) == (
+ ... int(http_client.ACCEPTED),
+ ... ) + BaseHTTPRequestHandler.responses[http_client.ACCEPTED]
+ True
"""
if not status:
