wip 9
This commit is contained in:
@@ -3,18 +3,6 @@ from typing import Optional
|
||||
from zope.interface import Interface, implementer
|
||||
|
||||
|
||||
class IAddress(Interface):
|
||||
pass
|
||||
|
||||
|
||||
@implementer(IAddress)
|
||||
class DummyAddress:
|
||||
pass
|
||||
|
||||
|
||||
dummy_address = DummyAddress()
|
||||
|
||||
|
||||
class IProtocol(Interface):
|
||||
pass
|
||||
|
||||
@@ -29,13 +17,13 @@ class _WrappingProtocol(Protocol):
|
||||
|
||||
|
||||
class IProtocolFactory(Interface):
|
||||
def buildProtocol(addr: IAddress) -> Optional[IProtocol]:
|
||||
def buildProtocol() -> Optional[IProtocol]:
|
||||
pass
|
||||
|
||||
|
||||
def _make_connection(
|
||||
client_factory: IProtocolFactory,
|
||||
) -> None:
|
||||
client_protocol = client_factory.buildProtocol(dummy_address)
|
||||
client_protocol = client_factory.buildProtocol()
|
||||
assert isinstance(client_protocol, _WrappingProtocol)
|
||||
print("Hello")
|
||||
|
||||
Reference in New Issue
Block a user