summary refs log tree commit diff
path: root/tests/handlers/test_appservice.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Only return an appservice protocol if it has a service providing it. (#10532)Will Hunt2021-08-051-1/+121
| | | | | | If there are no services providing a protocol, omit it completely instead of returning an empty dictionary. This fixes a long-standing spec compliance bug.
* update black to 21.6b0 (#10197)Marcus2021-06-171-1/+1
| | | | | Reformat all files with the new version. Signed-off-by: Marcus Hoffmann <bubu@bubu1.eu>
* Always update AS last_pos, even on no events (#10107)14mRh4X0r2021-06-071-4/+2
| | | | | | | | | | Fixes #1834. `get_new_events_for_appservice` internally calls `get_events_as_list`, which will filter out any rejected events. If all returned events are filtered out, `_notify_interested_services` will return without updating the last handled stream position. If there are 100 consecutive such events, processing will halt altogether. Breaking the loop is now done by checking whether we're up-to-date with `current_max` in the loop condition, instead of relying on an empty `events` list. Signed-off-by: Willem Mulder <14mRh4X0r@gmail.com>
* 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>`
* Use mock from the stdlib. (#9772)Patrick Cloke2021-04-091-1/+1
|
* Convert additional test-cases to homeserver test case. (#9396)Patrick Cloke2021-02-161-17/+16
| | | And convert some inlineDeferreds to async-friendly functions.
* Start fewer opentracing spans (#8640)Erik Johnston2020-10-261-12/+8
| | | | | | | #8567 started a span for every background process. This is good as it means all Synapse code that gets run should be in a span (unless in the sentinel logging context), but it means we generate about 15x the number of spans as we did previously. This PR attempts to reduce that number by a) not starting one for send commands to Redis, and b) deferring starting background processes until after we're sure they're necessary. I don't really know how much this will help.
* Fix not sending events over federation when using sharded event persisters ↵Erik Johnston2020-10-141-3/+10
| | | | | | | | | | | | | | | | | (#8536) * Fix outbound federaion with multiple event persisters. We incorrectly notified federation senders that the minimum persisted stream position had advanced when we got an `RDATA` from an event persister. Notifying of federation senders already correctly happens in the notifier, so we just delete the offending line. * Change some interfaces to use RoomStreamToken. By enforcing use of `RoomStreamTokens` we make it less likely that people pass in random ints that they got from somewhere random.
* Convert directory, e2e_room_keys, end_to_end_keys, monthly_active_users ↵Patrick Cloke2020-08-071-1/+1
| | | | database to async (#8042)
* Convert appservice to async. (#7973)Patrick Cloke2020-07-301-2/+3
|
* Convert the appservice handler to async/await. (#7775)Patrick Cloke2020-07-061-33/+35
|
* Run black.black2018-08-101-27/+12
|
* run isortAmber Brown2018-07-091-3/+5
|
* Fix testsErik Johnston2018-04-111-0/+1
|
* Fix appservice tests to account for new behavior of notify_interested_servicesIlya Zhuravlev2017-11-021-3/+12
|
* Make AppserviceHandler stream events from databaseErik Johnston2016-08-181-3/+6
| | | | | | | | | This is for two reasons: 1. Suppresses duplicates correctly, as the notifier doesn't do any duplicate suppression. 2. Makes it easier to connect the AppserviceHandler to the replication stream.
* Make notify_interested_services fasterErik Johnston2016-08-171-3/+10
|
* Update unit testsErik Johnston2016-08-171-0/+2
|
* Move the AS handler out of the Handlers object.Mark Haines2016-05-311-3/+3
| | | | | | Access it directly from the homeserver itself. It already wasn't inheriting from BaseHandler storing it on the Handlers object was already somewhat dubious.
* Fix flake8 warnings for testsMark Haines2016-02-191-2/+0
|
* copyrightsMatthew Hodgson2016-01-071-1/+1
|
* Fix bug where synapse was sending AS user queries incorrectly.Kegan Dougal2015-06-171-0/+43
| | | | | | Bug introduced in 92b20713d7c6346aeb20dc09963081e472752bb5 which reversed the comparison when checking if a user existed in the users table. Added UTs to prevent this happening again.
* Use seconds; start gluing in the AS scheduler into the AS handler.Kegan Dougal2015-03-091-2/+5
|
* Dependency inject ApplicationServiceApi when creating ↵Kegan Dougal2015-02-051-7/+3
| | | | ApplicationServicesHandler.
* Fix unit tests.Kegan Dougal2015-02-051-2/+5
|
* Add unit test for appservice_handler.query_room_alias_existsKegan Dougal2015-02-051-1/+30
|
* Add unknown user ID check. Use store.get_aliases_for_room(room_id) when ↵Kegan Dougal2015-02-051-0/+1
| | | | searching for services by alias.
* Fix bug in store defer. Add more unit tests.Kegan Dougal2015-02-041-5/+1
|
* Begin to add unit tests for appservice glue and regex testing.Kegan Dougal2015-02-041-0/+68