From c469f74e2910e1797652c1451c19b49ffaaf34b0 Mon Sep 17 00:00:00 2001 From: Jason Robinson Date: Thu, 24 Dec 2020 22:21:20 +0200 Subject: [PATCH] Fix tests --- federation/tests/django/utils.py | 3 ++- federation/tests/entities/diaspora/test_utils.py | 2 +- federation/tests/protocols/matrix/test_appservice.py | 10 +++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/federation/tests/django/utils.py b/federation/tests/django/utils.py index 7787fe0..6ca549c 100644 --- a/federation/tests/django/utils.py +++ b/federation/tests/django/utils.py @@ -34,9 +34,10 @@ def matrix_config_func() -> Dict: return { "homeserver_base_url": "https://matrix.domain.tld", "homeserver_domain_with_port": "matrix.domain.tld:443", + "homeserver_name": "domain.tld", "appservice": { "id": "uniqueid", - "sender_localpart": "_myawesomeapp", + "shortcode": "myawesomeapp", "token": "secret_token", }, "identity_server_base_url": "https://id.domain.tld", diff --git a/federation/tests/entities/diaspora/test_utils.py b/federation/tests/entities/diaspora/test_utils.py index 2da2227..603da2f 100644 --- a/federation/tests/entities/diaspora/test_utils.py +++ b/federation/tests/entities/diaspora/test_utils.py @@ -27,7 +27,7 @@ class TestGetBaseAttributes: "created_at", "name", "email", "gender", "raw_content", "location", "public", "nsfw", "public_key", "image_urls", "tag_list", "signature", "url", "atom_url", "base_url", "id", "actor_id", "handle", "handle", "guid", "activity", "activity_id", "username", - "inboxes", + "inboxes", "mxid", } diff --git a/federation/tests/protocols/matrix/test_appservice.py b/federation/tests/protocols/matrix/test_appservice.py index 0874eb6..93da490 100644 --- a/federation/tests/protocols/matrix/test_appservice.py +++ b/federation/tests/protocols/matrix/test_appservice.py @@ -15,12 +15,20 @@ def test_get_registration(): "exclusive": False, "regex": "@.*", }, + { + "exclusive": True, + "regex": "@_myawesomeapp_.*", + }, ], "aliases": [ { "exclusive": False, "regex": "#.*", - } + }, + { + "exclusive": True, + "regex": "#_myawesomeapp_.*", + }, ], "rooms": [], }