MatrixSynapse/tests/events
David Robertson e2a1adbf5d
Allow selecting "prejoin" events by state keys (#14642)
* Declare new config

* Parse new config

* Read new config

* Don't use trial/our TestCase where it's not needed

Before:

```
$ time trial tests/events/test_utils.py > /dev/null

real	0m2.277s
user	0m2.186s
sys	0m0.083s
```

After:
```
$ time trial tests/events/test_utils.py > /dev/null

real	0m0.566s
user	0m0.508s
sys	0m0.056s
```

* Helper to upsert to event fields

without exceeding size limits.

* Use helper when adding invite/knock state

Now that we allow admins to include events in prejoin room state with
arbitrary state keys, be a good Matrix citizen and ensure they don't
accidentally create an oversized event.

* Changelog

* Move StateFilter tests

should have done this in #14668

* Add extra methods to StateFilter

* Use StateFilter

* Ensure test file enforces typed defs; alphabetise

* Workaround surprising get_current_state_ids

* Whoops, fix mypy
2022-12-13 00:54:46 +00:00
..
__init__.py Add some unit tests of prune_events() 2015-10-16 19:56:46 +01:00
test_presence_router.py Modernize unit tests configuration settings for workers. (#14568) 2022-12-01 07:38:27 -05:00
test_snapshot.py Rename storage classes (#12913) 2022-05-31 12:17:50 +00:00
test_utils.py Allow selecting "prejoin" events by state keys (#14642) 2022-12-13 00:54:46 +00:00