mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-02 01:56:02 -04:00
Move wait_until_result
into FakeChannel
(#8758)
FakeChannel has everything we need, and this more accurately models the real flow.
This commit is contained in:
parent
4f76eef0e8
commit
f125895475
3 changed files with 24 additions and 25 deletions
|
@ -32,7 +32,7 @@ from synapse.util.httpresourcetree import create_resource_tree
|
|||
from synapse.util.stringutils import random_string
|
||||
|
||||
from tests import unittest
|
||||
from tests.server import FakeChannel, wait_until_result
|
||||
from tests.server import FakeChannel
|
||||
from tests.utils import default_config
|
||||
|
||||
|
||||
|
@ -94,7 +94,7 @@ class RemoteKeyResourceTestCase(BaseRemoteKeyResourceTestCase):
|
|||
% (server_name.encode("utf-8"), key_id.encode("utf-8")),
|
||||
b"1.1",
|
||||
)
|
||||
wait_until_result(self.reactor, req)
|
||||
channel.await_result()
|
||||
self.assertEqual(channel.code, 200)
|
||||
resp = channel.json_body
|
||||
return resp
|
||||
|
@ -190,7 +190,7 @@ class EndToEndPerspectivesTests(BaseRemoteKeyResourceTestCase):
|
|||
req.requestReceived(
|
||||
b"POST", path.encode("utf-8"), b"1.1",
|
||||
)
|
||||
wait_until_result(self.reactor, req)
|
||||
channel.await_result()
|
||||
self.assertEqual(channel.code, 200)
|
||||
resp = channel.json_body
|
||||
return resp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue