Provision the user and the device used in tests

This commit is contained in:
Quentin Gliech 2025-02-21 10:23:44 +01:00
parent 3e04912b8f
commit 4e5f49f91a
No known key found for this signature in database
GPG key ID: 22D62B84552719FC

View file

@ -147,6 +147,16 @@ class MSC3861OAuthDelegation(HomeserverTestCase):
return hs
def prepare(
self, reactor: MemoryReactor, clock: Clock, homeserver: HomeServer
) -> None:
# Provision the user and the device we use in the tests.
store = homeserver.get_datastores().main
self.get_success(store.register_user(USER_ID))
self.get_success(
store.store_device(USER_ID, DEVICE, initial_device_display_name=None)
)
def _assertParams(self) -> None:
"""Assert that the request parameters are correct."""
params = parse_qs(self.http_client.request.call_args[1]["data"].decode("utf-8"))