diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2018-08-11 00:12:56 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-11 00:12:56 +1000 |
commit | a001038b92c4f0082cad60e5e87d0bd01374c9de (patch) | |
tree | a1d678eb7fbaa0f9715bb0e751d6e3c6e52cb3f0 /tests/federation/test_federation_server.py | |
parent | Merge branch 'rav/fix_linearizer_cancellation' into develop (diff) | |
parent | fix up a forced long line (diff) | |
download | synapse-a001038b92c4f0082cad60e5e87d0bd01374c9de.tar.xz |
Merge pull request #3679 from matrix-org/hawkowl/blackify-tests
Blackify the tests
Diffstat (limited to 'tests/federation/test_federation_server.py')
-rw-r--r-- | tests/federation/test_federation_server.py | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/tests/federation/test_federation_server.py b/tests/federation/test_federation_server.py index c91e25f54f..af15f4cc5a 100644 --- a/tests/federation/test_federation_server.py +++ b/tests/federation/test_federation_server.py @@ -23,10 +23,7 @@ from tests import unittest @unittest.DEBUG class ServerACLsTestCase(unittest.TestCase): def test_blacklisted_server(self): - e = _create_acl_event({ - "allow": ["*"], - "deny": ["evil.com"], - }) + e = _create_acl_event({"allow": ["*"], "deny": ["evil.com"]}) logging.info("ACL event: %s", e.content) self.assertFalse(server_matches_acl_event("evil.com", e)) @@ -36,10 +33,7 @@ class ServerACLsTestCase(unittest.TestCase): self.assertTrue(server_matches_acl_event("honestly.not.evil.com", e)) def test_block_ip_literals(self): - e = _create_acl_event({ - "allow_ip_literals": False, - "allow": ["*"], - }) + e = _create_acl_event({"allow_ip_literals": False, "allow": ["*"]}) logging.info("ACL event: %s", e.content) self.assertFalse(server_matches_acl_event("1.2.3.4", e)) @@ -49,10 +43,12 @@ class ServerACLsTestCase(unittest.TestCase): def _create_acl_event(content): - return FrozenEvent({ - "room_id": "!a:b", - "event_id": "$a:b", - "type": "m.room.server_acls", - "sender": "@a:b", - "content": content - }) + return FrozenEvent( + { + "room_id": "!a:b", + "event_id": "$a:b", + "type": "m.room.server_acls", + "sender": "@a:b", + "content": content, + } + ) |