/usr/lib/python3/dist-packages/twisted/web/test
NameSizeModeActions
__pycache__/-0755rm
injectionhelpers.py56270644editdlrm
requesthelper.py134060644editdlrm
test_agent.py1178050644editdlrm
test_cgi.py137610644editdlrm
test_client.py13720644editdlrm
test_distrib.py182880644editdlrm
test_domhelpers.py111030644editdlrm
test_error.py162100644editdlrm
test_flatten.py182590644editdlrm
test_html.py12640644editdlrm
test_http.py1365660644editdlrm
test_http2.py1099830644editdlrm
test_httpauth.py241280644editdlrm
test_http_headers.py203860644editdlrm
test_newclient.py1087510644editdlrm
test_proxy.py200920644editdlrm
test_resource.py82140644editdlrm
test_script.py37840644editdlrm
test_stan.py56670644editdlrm
test_static.py678580644editdlrm
test_tap.py109470644editdlrm
test_template.py259770644editdlrm
test_util.py139000644editdlrm
test_vhost.py79170644editdlrm
test_web.py659960644editdlrm
test_webclient.py596150644editdlrm
test_web__responses.py8770644editdlrm
test_wsgi.py782100644editdlrm
test_xml.py423570644editdlrm
test_xmlrpc.py303020644editdlrm
_util.py25680644editdlrm
__init__.py1080644editdlrm
Edit: /usr/lib/python3/dist-packages/twisted/web/test/test_client.py (1372B)
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for various parts of L{twisted.web}. """ from zope.interface import implementer, verify from twisted.internet import defer, interfaces from twisted.trial import unittest from twisted.web import client @implementer(interfaces.IStreamClientEndpoint) class DummyEndPoint(object): """An endpoint that does not connect anywhere""" def __init__(self, someString): self.someString = someString def __repr__(self): return 'DummyEndPoint({})'.format(self.someString) def connect(self, factory): return defer.succeed(dict(factory=factory)) class HTTPConnectionPoolTests(unittest.TestCase): """ Unit tests for L{client.HTTPConnectionPoolTest}. """ def test_implements(self): """L{DummyEndPoint}s implements L{interfaces.IStreamClientEndpoint}""" ep = DummyEndPoint("something") verify.verifyObject(interfaces.IStreamClientEndpoint, ep) def test_repr(self): """connection L{repr()} includes endpoint's L{repr()}""" pool = client.HTTPConnectionPool(reactor=None) ep = DummyEndPoint("this_is_probably_unique") d = pool.getConnection('someplace', ep) result = self.successResultOf(d) representation = repr(result) self.assertIn(repr(ep), representation)