summary refs log tree commit diff
path: root/tests/federation/test_federation_server.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request from GHSA-x345-32rc-8h85Richard van der Hoff2021-05-111-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests for push rule pattern matching * tests for acl pattern matching * factor out common `re.escape` * Factor out common re.compile * Factor out common anchoring code * add word_boundary support to `glob_to_regex` * Use `glob_to_regex` in push rule evaluator NB that this drops support for character classes. I don't think anyone ever used them. * Improve efficiency of globs with multiple wildcards The idea here is that we compress multiple `*` globs into a single `.*`. We also need to consider `?`, since `*?*` is as hard to implement efficiently as `**`. * add assertion on regex pattern * Fix mypy * Simplify glob_to_regex * Inline the glob_to_regex helper function Signed-off-by: Dan Callahan <danc@element.io> * Moar comments Signed-off-by: Dan Callahan <danc@element.io> Co-authored-by: Dan Callahan <danc@element.io>
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* Remove spurious "SynapseRequest" result from `make_request"Richard van der Hoff2020-12-151-3/+3
| | | | This was never used, so let's get rid of it.
* Remove redundant `HomeserverTestCase.render`Richard van der Hoff2020-11-161-3/+0
|
* Fix the exception that is raised when invalid JSON is encountered. (#8291)Patrick Cloke2020-09-101-0/+33
|
* Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)Patrick Cloke2020-02-211-1/+1
| | | | Ensure good comprehension hygiene using flake8-comprehensions.
* Add a `make_event_from_dict` method (#6858)Richard van der Hoff2020-02-071-2/+2
| | | | | | | ... and use it in places where it's trivial to do so. This will make it easier to pass room versions into the FrozenEvent constructors.
* Implementation of MSC2314 (#6176)Amber Brown2019-11-281-0/+63
|
* Remove test debugsErik Johnston2019-08-201-1/+0
|
* Run black.black2018-08-101-15/+11
|
* run isortAmber Brown2018-07-091-0/+1
|
* Implementation of server_aclsRichard van der Hoff2018-07-041-0/+57
... as described at https://docs.google.com/document/d/1EttUVzjc2DWe2ciw4XPtNpUpIl9lWXGEsy2ewDS7rtw.