mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-12-15 20:09:02 -05:00
[pyupgrade] tests/ (#10347)
This commit is contained in:
parent
879d8c1ee1
commit
89cfc3dd98
20 changed files with 45 additions and 58 deletions
|
|
@ -273,7 +273,7 @@ class MatrixFederationAgentTests(unittest.TestCase):
|
|||
self.assertEqual(response.code, 200)
|
||||
|
||||
# Send the body
|
||||
request.write('{ "a": 1 }'.encode("ascii"))
|
||||
request.write(b'{ "a": 1 }')
|
||||
request.finish()
|
||||
|
||||
self.reactor.pump((0.1,))
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ class FederationClientTests(HomeserverTestCase):
|
|||
self.assertNoResult(test_d)
|
||||
|
||||
# Send it the HTTP response
|
||||
res_json = '{ "a": 1 }'.encode("ascii")
|
||||
res_json = b'{ "a": 1 }'
|
||||
protocol.dataReceived(
|
||||
b"HTTP/1.1 200 OK\r\n"
|
||||
b"Server: Fake\r\n"
|
||||
|
|
@ -339,10 +339,8 @@ class FederationClientTests(HomeserverTestCase):
|
|||
|
||||
# Send it the HTTP response
|
||||
client.dataReceived(
|
||||
(
|
||||
b"HTTP/1.1 200 OK\r\nContent-Type: application/json\r\n"
|
||||
b"Server: Fake\r\n\r\n"
|
||||
)
|
||||
b"HTTP/1.1 200 OK\r\nContent-Type: application/json\r\n"
|
||||
b"Server: Fake\r\n\r\n"
|
||||
)
|
||||
|
||||
# Push by enough to time it out
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue