Skip to main content

Module test_utils

Module test_utils 

Source
Expand description

Event builders and in-memory stores for state-resolution tests and benchmarks.

The fixtures exercise authorization and resolution without a running server.

Modulesยง

fetch ๐Ÿ”’

Structsยง

TestStore
An in-memory fixture event store.

Staticsยง

SERVER_TIMESTAMP ๐Ÿ”’

Functionsยง

INITIAL_EVENTS
Builds the common room state and membership fixture events.
alice
Returns the Alice fixture user.
bob
Returns the Bob fixture user.
charlie
Returns the Charlie fixture user.
ella
Returns the Ella fixture user.
event_id
Constructs a synthetic event identifier, preserving a supplied full identifier.
event_not_found ๐Ÿ”’
member_content_ban
Builds membership content for a banned user.
member_content_join
Builds membership content for a joined user.
room_id
Returns the fixture room identifier.
to_pdu_event
Builds a fixture PDU with synthetic identifiers and an increasing timestamp.