r47317 - interfaces
hawkowl-TA+aISz0psMTMxyoc4vAAJOcrHinNvQL0E9HWUfgJXw@public.gmane.org Mon, 25 Apr 2016 08:16:11 -0600 (MDT)
| Newsgroups | gmane.comp.python.twisted.commits |
|---|---|
| Message-ID | <[email protected]> |
Author: hawkowl
Date: Mon Apr 25 08:16:05 2016
New Revision: 47317
Modified:
branches/proper-upgrade-8301-2/twisted/web/test/test_http.py
Log:
interfaces
Modified: branches/proper-upgrade-8301-2/twisted/web/test/test_http.py
==============================================================================
--- branches/proper-upgrade-8301-2/twisted/web/test/test_http.py (original)
+++ branches/proper-upgrade-8301-2/twisted/web/test/test_http.py Mon Apr 25 08:16:05 2016
@@ -9,6 +9,8 @@
import random, cgi, base64
+from zope.interface import implementer
+
try:
from urlparse import urlparse, urlunsplit, clear_cache
except ImportError:
@@ -19,7 +21,7 @@
from twisted.python.failure import Failure
from twisted.trial import unittest
from twisted.trial.unittest import TestCase
-from twisted.web import http, http_headers
+from twisted.web import http, http_headers, iweb
from twisted.web.http import (
HTTPFactory, PotentialDataLoss, _DataLoss, _version,
_IdentityTransferDecoder)
@@ -2586,6 +2588,7 @@
and an "Upgrade" header that lists a protocol we support will be
upgraded to that protocol.
"""
+ @implementer(iweb.IHTTPUpgradeable)
class PiUpgrader(object):
def upgrade(self, verb, path, headers):
@@ -2650,6 +2653,7 @@
echoFactory.protocol = Echo
echoFactory.startFactory()
+ @implementer(iweb.IHTTPUpgradeable)
class ReplayUpgrader(object):
def upgrade(self, verb, path, headers):
@@ -2674,6 +2678,7 @@
A ALPN-negotiated HTTP/1.1 protocol needs to be read and checked for
any upgrade requests.
"""
+ @implementer(iweb.IHTTPUpgradeable)
class PiUpgrader(object):
def upgrade(self, verb, path, headers):