Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
TEMP: Test w/o patch.
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep committed Oct 23, 2023
1 parent 15107e6 commit 5dcaea6
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions tests/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
Union,
cast,
)
from unittest.mock import Mock, patch
from unittest.mock import Mock

import attr
from typing_extensions import ParamSpec
Expand Down Expand Up @@ -474,18 +474,6 @@ def getHostByName(
return fail(DNSLookupError("OH NO: unknown %s" % (name,)))
return succeed(lookups[name])

# In order for the TLS protocols to use the proper reactor's clock we need to patch
# _get_default_clock.
#
# This is *super* dirty since we never unpatch and rely on the next test
# to patch over us.
#
# Use create=True for backwards compatibilty with Twisted <= 23.8.0.
self._tls_clock_patcher = patch(
"twisted.protocols.tls._get_default_clock", return_value=self, create=True
)
self._tls_clock_patcher.start()

self.nameResolver = SimpleResolverComplexifier(FakeResolver())
super().__init__()

Expand Down

0 comments on commit 5dcaea6

Please sign in to comment.