Add the delay to appropriate test.

This commit is contained in:
Itamar Turner-Trauring 2022-11-17 11:01:12 -05:00
parent 097d918a24
commit d182a2f186

View File

@ -144,6 +144,10 @@ class PinningHTTPSValidation(AsyncTestCase):
response = await self.request(url, certificate)
self.assertEqual(await response.content(), b"YOYODYNE")
# We keep getting TLSMemoryBIOProtocol being left around, so try harder
# to wait for it to finish.
await deferLater(reactor, 0.01)
@async_to_deferred
async def test_server_certificate_has_wrong_hash(self):
"""
@ -179,10 +183,6 @@ class PinningHTTPSValidation(AsyncTestCase):
response = await self.request(url, certificate)
self.assertEqual(await response.content(), b"YOYODYNE")
# We keep getting TLSMemoryBIOProtocol being left around, so try harder
# to wait for it to finish.
await deferLater(reactor, 0.01)
@async_to_deferred
async def test_server_certificate_not_valid_yet(self):
"""