summary refs log tree commit diff
path: root/tests/rest/client/v1/utils.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Flatten tests/rest/client/{v1,v2_alpha} too (#10667)David Robertson2021-08-201-654/+0
|
* Fix type hints in space summary tests. (#10575)Patrick Cloke2021-08-111-3/+3
| | | And ensure that the file is checked via mypy.
* Add a new version of the R30 phone-home metric, which removes a false ↵reivilibre2021-07-191-3/+27
| | | | | impression of retention given by the old R30 metric (#10332) Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
* Do not recurse into non-spaces in the spaces summary. (#10256)Patrick Cloke2021-06-291-1/+2
| | | | | Previously m.child.room events in non-space rooms would be treated as part of the room graph, but this is no longer supported.
* 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-2/+1
|
* Bugbear: Add Mutable Parameter fixes (#9682)Jonathan de Jong2021-04-081-4/+10
| | | | | | | Part of #9366 Adds in fixes for B006 and B008, both relating to mutable parameter lint errors. Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>
* SSO: redirect to public URL before setting cookies (#9436)Richard van der Hoff2021-02-261-1/+18
| | | ... otherwise, we don't get the cookie back.
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-11/+25
| | | | | | | - Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version
* Fix bugs in handling clientRedirectUrl, and improve OIDC tests (#9127, #9128)Richard van der Hoff2021-01-181-26/+36
| | | | | | | | | | | | | | | | * Factor out a common TestHtmlParser Looks like I'm doing this in a few different places. * Improve OIDC login test Complete the OIDC login flow, rather than giving up halfway through. * Ensure that OIDC login works with multiple OIDC providers * Fix bugs in handling clientRedirectUrl - don't drop duplicate query-params, or params with no value - allow utf-8 in query-params
* Improve UsernamePickerTestCase (#9112)Richard van der Hoff2021-01-151-5/+6
| | | | | * make the OIDC bits of the test work at a higher level - via the REST api instead of poking the OIDCHandler directly. * Move it to test_login.py, where I think it fits better.
* Add a test for UI-Auth-via-SSO (#9082)Richard van der Hoff2021-01-131-36/+160
| | | | | * Add complete test for UI-Auth-via-SSO. * review comments
* Add some tests for the IDP picker flowRichard van der Hoff2021-01-071-1/+2
|
* Merge pull request #8951 from matrix-org/rav/username_picker_2Richard van der Hoff2020-12-161-1/+1
|\ | | | | More preparatory refactoring of the OidcHandler tests
| * Test `get_extra_attributes` fallbackRichard van der Hoff2020-12-151-1/+1
| | | | | | | | | | despite the warnings saying "don't implement get_extra_attributes", we had implemented it, so the tests weren't doing what we thought they were.
* | Remove spurious "SynapseRequest" result from `make_request"Richard van der Hoff2020-12-151-10/+8
|/ | | | This was never used, so let's get rid of it.
* UIA: offer only available auth flowsRichard van der Hoff2020-12-021-1/+115
| | | | | | | During user-interactive auth, do not offer password auth to users with no password, nor SSO auth to users with no SSO. Fixes #7559.
* Allow specifying room version in 'RestHelper.create_room_as' and add typing ↵Andrew Morgan2020-12-021-2/+25
| | | | | (#8854) This PR adds a `room_version` argument to the `RestHelper`'s `create_room_as` function for tests. I plan to use this for testing knocking, which currently uses an unstable room version.
* Remove redundant calls to `render()`Richard van der Hoff2020-11-161-11/+5
|
* Make `make_request` actually render the requestRichard van der Hoff2020-11-161-3/+1
| | | | | | remove the stubbing out of `request.process`, so that `requestReceived` also renders the request via the appropriate resource. Replace render() with a stub for now.
* Merge branch 'develop' into rav/pass_site_to_make_requestRichard van der Hoff2020-11-161-3/+1
|\
| * Add a `custom_headers` param to `make_request` (#8760)Richard van der Hoff2020-11-161-4/+6
| | | | | | | | Some tests want to set some custom HTTP request headers, so provide a way to do that before calling requestReceived().
* | pass a Site into make_requestRichard van der Hoff2020-11-151-6/+25
| |
* | pass a Site into RestHelperRichard van der Hoff2020-11-151-5/+6
|/
* Stop sub-classing object (#8249)Patrick Cloke2020-09-041-1/+1
|
* Fix join ratelimiter breaking profile updates and idempotency (#8153)Brendan Abolivier2020-08-241-3/+7
|
* Revert #7736 (#8039)Brendan Abolivier2020-08-061-20/+0
|
* Prevent join->join membership transitions changing member count (#7977)Andrew Morgan2020-08-031-1/+23
| | | | | | | | | | | `StatsHandler` handles updates to the `current_state_delta_stream`, and updates room stats such as the amount of state events, joined users, etc. However, it counts every new join membership as a new user entering a room (and that user being in another room), whereas it's possible for a user's membership status to go from join -> join, for instance when they change their per-room profile information. This PR adds a check for join->join membership transitions, and bails out early, as none of the further checks are necessary at that point. Due to this bug, membership stats in many rooms have ended up being wildly larger than their true values. I am not sure if we also want to include a migration step which recalculates these statistics (possibly using the `_populate_stats_process_rooms` bg update). Bug introduced in the initial implementation https://github.com/matrix-org/synapse/pull/4338.
* Re-implement unread counts (#7736)Brendan Abolivier2020-07-291-0/+20
|
* Fix limit logic for EventsStream (#7358)Richard van der Hoff2020-04-291-1/+1
| | | | | | | | | | | | | | | | | | | * Factor out functions for injecting events into database I want to add some more flexibility to the tools for injecting events into the database, and I don't want to clutter up HomeserverTestCase with them, so let's factor them out to a new file. * Rework TestReplicationDataHandler This wasn't very easy to work with: the mock wrapping was largely superfluous, and it's useful to be able to inspect the received rows, and clear out the received list. * Fix AssertionErrors being thrown by EventsStream Part of the problem was that there was an off-by-one error in the assertion, but also the limit logic was too simple. Fix it all up and add some tests.
* Default PL100 to enable encryption in a room (#7230)Andrew Morgan2020-04-091-4/+92
|
* Quarantine media by ID or user ID (#6681)Andrew Morgan2020-01-131-0/+37
|
* Update copyrightsBrendan Abolivier2019-11-051-0/+3
|
* Add integration tests for syncBrendan Abolivier2019-10-301-3/+12
|
* Fix and refactor room and user stats (#5971)Erik Johnston2019-09-041-2/+6
| | | Previously the stats were not being correctly populated.
* Run Black. (#5482)Amber Brown2019-06-201-4/+4
|
* Room Statistics (#4338)Amber Brown2019-05-211-0/+17
|
* Some more porting to HomeserverTestCase and remove old RESTHelper (#4913)Amber Brown2019-03-221-125/+0
|
* Remove some boilerplate in tests (#4156)Amber Brown2018-11-071-15/+7
|
* Port storage/ to Python 3 (#3725)Amber Brown2018-08-311-4/+10
|
* Fix the testsAmber Brown2018-08-151-5/+3
|
* Run black.black2018-08-101-29/+41
|
* Test fixes for Python 3 (#3647)Amber Brown2018-08-091-5/+5
|
* Refactor REST API tests to use explicit reactors (#3351)Amber Brown2018-07-171-2/+113
|
* run isortAmber Brown2018-07-091-5/+5
|
* Linearize updates to membership via PUT /state/Erik Johnston2017-01-091-1/+4
|
* Fix flake8 warnings for testsMark Haines2016-02-191-2/+3
|
* copyrightsMatthew Hodgson2016-01-071-1/+1
|
* Attempt to validate macaroonsDaniel Wagner-Hall2015-08-261-3/+0
| | | | | | | | | | | | | A couple of weird caveats: * If we can't validate your macaroon, we fall back to checking that your access token is in the DB, and ignoring the failure * Even if we can validate your macaroon, we still have to hit the DB to get the access token ID, which we pretend is a device ID all over the codebase. This mostly adds the interesting code, and points out the two pieces we need to delete (and necessary conditions) in order to fix the above caveats.
* s/by_token/by_access_token/gDaniel Wagner-Hall2015-08-201-1/+1
| | | | We're about to have two kinds of token, access and refresh
* Move client rest tests back under restMark Haines2015-01-221-0/+134