mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-10 08:10:01 -04:00
Remove spurious "SynapseRequest" result from `make_request"
This was never used, so let's get rid of it.
This commit is contained in:
parent
ac2acf1524
commit
394516ad1b
59 changed files with 742 additions and 983 deletions
|
@ -35,7 +35,7 @@ class FilterTestCase(unittest.HomeserverTestCase):
|
|||
]
|
||||
|
||||
def test_sync_argless(self):
|
||||
request, channel = self.make_request("GET", "/sync")
|
||||
channel = self.make_request("GET", "/sync")
|
||||
|
||||
self.assertEqual(channel.code, 200)
|
||||
self.assertTrue(
|
||||
|
@ -55,7 +55,7 @@ class FilterTestCase(unittest.HomeserverTestCase):
|
|||
"""
|
||||
self.hs.config.use_presence = False
|
||||
|
||||
request, channel = self.make_request("GET", "/sync")
|
||||
channel = self.make_request("GET", "/sync")
|
||||
|
||||
self.assertEqual(channel.code, 200)
|
||||
self.assertTrue(
|
||||
|
@ -194,7 +194,7 @@ class SyncFilterTestCase(unittest.HomeserverTestCase):
|
|||
tok=tok,
|
||||
)
|
||||
|
||||
request, channel = self.make_request(
|
||||
channel = self.make_request(
|
||||
"GET", "/sync?filter=%s" % sync_filter, access_token=tok
|
||||
)
|
||||
self.assertEqual(channel.code, 200, channel.result)
|
||||
|
@ -245,21 +245,19 @@ class SyncTypingTests(unittest.HomeserverTestCase):
|
|||
self.helper.send(room, body="There!", tok=other_access_token)
|
||||
|
||||
# Start typing.
|
||||
request, channel = self.make_request(
|
||||
channel = self.make_request(
|
||||
"PUT",
|
||||
typing_url % (room, other_user_id, other_access_token),
|
||||
b'{"typing": true, "timeout": 30000}',
|
||||
)
|
||||
self.assertEquals(200, channel.code)
|
||||
|
||||
request, channel = self.make_request(
|
||||
"GET", "/sync?access_token=%s" % (access_token,)
|
||||
)
|
||||
channel = self.make_request("GET", "/sync?access_token=%s" % (access_token,))
|
||||
self.assertEquals(200, channel.code)
|
||||
next_batch = channel.json_body["next_batch"]
|
||||
|
||||
# Stop typing.
|
||||
request, channel = self.make_request(
|
||||
channel = self.make_request(
|
||||
"PUT",
|
||||
typing_url % (room, other_user_id, other_access_token),
|
||||
b'{"typing": false}',
|
||||
|
@ -267,7 +265,7 @@ class SyncTypingTests(unittest.HomeserverTestCase):
|
|||
self.assertEquals(200, channel.code)
|
||||
|
||||
# Start typing.
|
||||
request, channel = self.make_request(
|
||||
channel = self.make_request(
|
||||
"PUT",
|
||||
typing_url % (room, other_user_id, other_access_token),
|
||||
b'{"typing": true, "timeout": 30000}',
|
||||
|
@ -275,9 +273,7 @@ class SyncTypingTests(unittest.HomeserverTestCase):
|
|||
self.assertEquals(200, channel.code)
|
||||
|
||||
# Should return immediately
|
||||
request, channel = self.make_request(
|
||||
"GET", sync_url % (access_token, next_batch)
|
||||
)
|
||||
channel = self.make_request("GET", sync_url % (access_token, next_batch))
|
||||
self.assertEquals(200, channel.code)
|
||||
next_batch = channel.json_body["next_batch"]
|
||||
|
||||
|
@ -289,9 +285,7 @@ class SyncTypingTests(unittest.HomeserverTestCase):
|
|||
# invalidate the stream token.
|
||||
self.helper.send(room, body="There!", tok=other_access_token)
|
||||
|
||||
request, channel = self.make_request(
|
||||
"GET", sync_url % (access_token, next_batch)
|
||||
)
|
||||
channel = self.make_request("GET", sync_url % (access_token, next_batch))
|
||||
self.assertEquals(200, channel.code)
|
||||
next_batch = channel.json_body["next_batch"]
|
||||
|
||||
|
@ -299,9 +293,7 @@ class SyncTypingTests(unittest.HomeserverTestCase):
|
|||
# ahead, and therefore it's saying the typing (that we've actually
|
||||
# already seen) is new, since it's got a token above our new, now-reset
|
||||
# stream token.
|
||||
request, channel = self.make_request(
|
||||
"GET", sync_url % (access_token, next_batch)
|
||||
)
|
||||
channel = self.make_request("GET", sync_url % (access_token, next_batch))
|
||||
self.assertEquals(200, channel.code)
|
||||
next_batch = channel.json_body["next_batch"]
|
||||
|
||||
|
@ -383,7 +375,7 @@ class UnreadMessagesTestCase(unittest.HomeserverTestCase):
|
|||
|
||||
# Send a read receipt to tell the server we've read the latest event.
|
||||
body = json.dumps({"m.read": res["event_id"]}).encode("utf8")
|
||||
request, channel = self.make_request(
|
||||
channel = self.make_request(
|
||||
"POST",
|
||||
"/rooms/%s/read_markers" % self.room_id,
|
||||
body,
|
||||
|
@ -450,7 +442,7 @@ class UnreadMessagesTestCase(unittest.HomeserverTestCase):
|
|||
def _check_unread_count(self, expected_count: True):
|
||||
"""Syncs and compares the unread count with the expected value."""
|
||||
|
||||
request, channel = self.make_request(
|
||||
channel = self.make_request(
|
||||
"GET", self.url % self.next_batch, access_token=self.tok,
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue