summary refs log tree commit diff
path: root/tests/rest/admin/test_media.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Parse Integer negative value validation (#16920)Gordan Trevis2024-04-161-2/+3
|
* Correctly mention previous copyright (#16820)Erik Johnston2024-01-231-0/+2
| | | | | During the migration the automated script to update the copyright headers accidentally got rid of some of the existing copyright lines. Reinstate them.
* Update license headersPatrick Cloke2023-11-211-11/+16
|
* Return attrs for more media repo APIs. (#16611)Patrick Cloke2023-11-091-8/+8
|
* Register media servlets via regex. (#16419)Patrick Cloke2023-10-061-50/+21
| | | | | This converts the media servlet URLs in the same way as (most) of the rest of Synapse. This will give more flexibility in the versions each endpoint exists under.
* Refactor media modules. (#15146)Patrick Cloke2023-02-271-1/+1
| | | | | | | * Removes the `v1` directory from `test.rest.media.v1`. * Moves the non-REST code from `synapse.rest.media.v1` to `synapse.media`. * Flatten the `v1` directory from `synapse.rest.media`, but leave compatiblity with 3rd party media repositories and spam checkers.
* Bump black from 22.12.0 to 23.1.0 (#15103)dependabot[bot]2023-02-221-5/+0
|
* Respond correctly to unknown methods on known endpoints (#14605)Patrick Cloke2023-02-091-3/+6
| | | | Respond with a 405 error if a request is received on a known endpoint, but to an unknown method, per MSC3743.
* Use literals in place of `HTTPStatus` constants in tests (#13488)Dirk Klimpel2022-08-101-80/+19
| | | | | | | | | * Use literals in place of `HTTPStatus` constants in tests * newsfile * code style * code style
* Use literals in place of `HTTPStatus` constants in tests (#13479)Dirk Klimpel2022-08-091-16/+16
| | | | | | | | | | Replace - `HTTPStatus.NOT_FOUND` - `HTTPStatus.FORBIDDEN` - `HTTPStatus.UNAUTHORIZED` - `HTTPStatus.CONFLICT` - `HTTPStatus.CREATED` Signed-off-by: Dirk Klimpel <dirk@klimpel.org>
* Use literals in place of `HTTPStatus` constants in tests (#13469)Dirk Klimpel2022-08-081-26/+25
|
* Add type hints for `tests/unittest.py`. (#12347)Richard van der Hoff2022-04-011-0/+8
| | | In particular, add type hints for get_success and friends, which are then helpful in a bunch of places.
* Remove `HomeServer.get_datastore()` (#12031)Richard van der Hoff2022-02-231-2/+2
| | | | | | | The presence of this method was confusing, and mostly present for backwards compatibility. Let's get rid of it. Part of #11733
* Add type hints to `synapse/tests/rest/admin` (#11590)Dirk Klimpel2021-12-161-1/+3
|
* Add missing `errcode` to `parse_string` and `parse_boolean` (#11542)Dirk Klimpel2021-12-091-1/+1
|
* Add type hints to `synapse/tests/rest/admin` (#11501)Dirk Klimpel2021-12-031-33/+36
|
* Convert status codes to `HTTPStatus` in `tests.rest.admin` (#11455)Dirk Klimpel2021-11-301-55/+136
|
* Show error when timestamp in seconds is provided to the /purge_media_cache ↵Aaron R2021-10-201-4/+102
| | | | API (#11101)
* Use direct references for configuration variables (part 5). (#10897)Patrick Cloke2021-09-241-2/+2
|
* Add reactor to `SynapseRequest` and fix up types. (#10868)Erik Johnston2021-09-241-3/+3
|
* Create a constant for a small png image in tests. (#10834)Patrick Cloke2021-09-161-28/+6
| | | To avoid duplicating it between a few tests.
* Flatten the synapse.rest.client package (#10600)reivilibre2021-08-171-1/+1
|
* Add type hints to additional servlet functions (#10437)Patrick Cloke2021-07-211-2/+2
| | | | | | | | | Improves type hints for: * parse_{boolean,integer} * parse_{boolean,integer}_from_args * parse_json_{value,object}_from_request And fixes any incorrect calls that resulted from unknown types.
* Add new admin APIs to remove media by media ID from quarantine. (#10044)Dirk Klimpel2021-06-021-0/+128
| | | | | Related to: #6681, #5956, #10040 Signed-off-by: Dirk Klimpel dirk@klimpel.org
* Add an admin API for unprotecting local media from quarantine (#10040)Dirk Klimpel2021-05-261-0/+99
| | | Signed-off-by: Dirk Klimpel dirk@klimpel.org
* 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>`
* Update black, and run auto formatting over the codebase (#9381)Eric Eastwood2021-02-161-14/+46
| | | | | | | - 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
* Removes unnecessary declarations in the tests for the admin API. (#9063)Dirk Klimpel2021-01-111-2/+0
|
* Remove spurious "SynapseRequest" result from `make_request"Richard van der Hoff2020-12-151-36/+26
| | | | This was never used, so let's get rid of it.
* Fix broken testcase (#8851)Richard van der Hoff2020-12-011-1/+0
| | | | This test was broken by #8565. It doesn't need to set set `self.clock` here anyway - that is done by `setUp`.
* Remove redundant `HomeserverTestCase.render`Richard van der Hoff2020-11-161-23/+0
|
* Make `make_request` actually render the requestRichard van der Hoff2020-11-161-6/+0
| | | | | | 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.
* use global make_request() directly where we have a custom ResourceRichard van der Hoff2020-11-151-3/+10
| | | | | | Where we want to render a request against a specific Resource, call the global make_request() function rather than the one in HomeserverTestCase, allowing us to pass in an appropriate `Site`.
* Add an admin api to delete local media. (#8519)Dirk Klimpel2020-10-261-0/+568
Related to: #6459, #3479 Add `DELETE /_synapse/admin/v1/media/<server_name>/<media_id>` to delete a single file from server.