summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/http/federation/dmr_reproduce_mypy_zope_pain.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/tests/http/federation/dmr_reproduce_mypy_zope_pain.py b/tests/http/federation/dmr_reproduce_mypy_zope_pain.py
index 5e9ac7ba61..a7f5f132de 100644
--- a/tests/http/federation/dmr_reproduce_mypy_zope_pain.py
+++ b/tests/http/federation/dmr_reproduce_mypy_zope_pain.py
@@ -3,27 +3,25 @@ from typing import Optional
 from zope.interface import Interface, implementer
 
 
-class IProtocol(Interface):
+class IFoo(Interface):
     pass
 
 
-@implementer(IProtocol)
-class Protocol:
+@implementer(IFoo)
+class BaseFoo:
     pass
 
 
-class _WrappingProtocol(Protocol):
+class ChildFoo(BaseFoo):
     pass
 
 
-class IProtocolFactory(Interface):
-    def buildProtocol() -> Optional[IProtocol]:
+class IFooFactory(Interface):
+    def build() -> Optional[IFoo]:
         pass
 
 
-def _make_connection(
-    client_factory: IProtocolFactory,
-) -> None:
-    client_protocol = client_factory.buildProtocol()
-    assert isinstance(client_protocol, _WrappingProtocol)
+def build_and_use_foo(client_factory: IFooFactory) -> None:
+    client_protocol = client_factory.build()
+    assert isinstance(client_protocol, ChildFoo)
     print("Hello")