From f06e57781559cde6bb139e9f0484de91fe884639 Mon Sep 17 00:00:00 2001 From: reivilibre Date: Wed, 18 Dec 2024 13:49:54 +0000 Subject: [PATCH] Fix unit tests by adding `setTcpNoDelay` to `FakeTransport`. (#402) Signed-off-by: Olivier Wilkinson (reivilibre) --- changelog.d/402.misc | 1 + tests/twisted_test_helpers.py | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 changelog.d/402.misc diff --git a/changelog.d/402.misc b/changelog.d/402.misc new file mode 100644 index 00000000..73d2ff3f --- /dev/null +++ b/changelog.d/402.misc @@ -0,0 +1 @@ +Fix unit tests by adding `setTcpNoDelay` to `FakeTransport`. \ No newline at end of file diff --git a/tests/twisted_test_helpers.py b/tests/twisted_test_helpers.py index ea2b328c..f8fc3ab8 100644 --- a/tests/twisted_test_helpers.py +++ b/tests/twisted_test_helpers.py @@ -165,6 +165,9 @@ def flush(self, maxbytes=None): logger.info("FakeTransport: Buffer now empty, completing disconnect") self.disconnected = True + def setTcpNoDelay(self, new: bool) -> None: + pass + def get_test_https_policy(): """Get a test IPolicyForHTTPS which trusts the test CA cert