Module test_utils

Source
Available on crate feature testing only.
Expand description

Testing utilities - DO NOT USE IN PRODUCTION.

Modules§

client
Augmented ClientBuilder that can set up an already logged-in user.
mocksNon-WebAssembly
Helpers to mock a server and have a client automatically connected to that server, for the purpose of integration tests.

Functions§

assert_event_matches_msg
Checks that an event is a message-like text event with the given text.
logged_in_client
A Client using the given homeserver_url (or localhost:1234), that will never retry any failed requests, and already logged in with an hardcoded Matrix authentication session (the user id and device id are hardcoded too).
logged_in_client_with_serverNon-WebAssembly
Like logged_in_client, but with a mocked server too.
no_retry_test_client
A Client using the given homeserver_url (or localhost:1234), that will never retry any failed requests.
no_retry_test_client_with_serverNon-WebAssembly
Like no_retry_test_client, but with a mocked server too.
set_client_session
Restore the common (Matrix-auth) user session for a client.
test_client_builder
A ClientBuilder fit for testing, using the given homeserver_url (or localhost:1234).
test_client_builder_with_serverNon-WebAssembly
Like test_client_builder, but with a mocked server too.