aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api/tests (follow)
Commit message (Collapse)AuthorAgeLines
* Do not activate infractions on partial updatesGravatar Johannes Christ2025-05-27-0/+43
|
* Do not require "active" to be sent in PATCH infraction (#1518)Gravatar jchristgit2025-05-01-1/+1
| | | Regression from the DRF update.
* Update tests for DRF 3.16.0Gravatar Johannes Christ2025-05-01-9/+22
| | | | | New error messages are returned, and there appears to be an upstream bug which presently requires us to specify all attributes in the update.
* Remove discriminator from bot logs view (#1424)Gravatar jchristgit2024-11-23-0/+6
| | | | | When a user does not have a discriminator, do not display it anymore. Behaviour for users with discriminators (for historic infractions is unchanged).
* Pleasure the style dictatorGravatar Johannes Christ2024-07-10-1/+1
|
* Add alternate accounts to the user modelGravatar jchristgit2024-05-23-1/+447
| | | | | Introduce a way to store alternate accounts on the user, and add the `PATCH /bot/users/<id:str>/alts` endpoint, which allows updating the user's alt accounts to the alt accounts in the request..
* Update reminder tests for new soft-deleted behaviourGravatar Chris Lovering2024-05-10-3/+10
|
* Merge branch 'main' into add-test-case-drf-3.15-regressionGravatar wookie1842024-04-02-6/+30
|\
| * Return BytesIO as fp for mocked HTTP errorsGravatar Johannes Christ2024-04-01-0/+3
| | | | | | | | Prevent spurious test failures on Solaris systems.
| * Update user tests with display_name fieldGravatar Joe Banks2024-04-01-4/+9
| |
| * Log failed webhook attempts to stderr in GitHub Webhook FilterGravatar Joe Banks2024-04-01-0/+14
| |
| * Update GitHub Filter endpoint tests for new responseGravatar Joe Banks2024-04-01-2/+4
| |
* | Add test case for DRF 3.15 regressionGravatar Johannes Christ2024-03-31-1/+46
|/
* Revert "Bump djangorestframework from 3.14.0 to 3.15.1"Gravatar jchristgit2024-03-31-11/+6
|
* Merge branch 'main' into support-test-keepdbGravatar Xithrius2024-03-30-6/+11
|\
| * Implement adjustments for DRF 3.15Gravatar Johannes Christ2024-03-29-6/+11
| |
* | Support running tests with --keepdb optionGravatar Johannes Christ2024-03-29-4/+11
|/ | | | | | Allow faster local tests by skipping the database re-setup. Only two cases were dependent on hardcoded IDs and already existing data, they have been adjusted appropriately.
* Migrate mailing lists to their own API endpointsGravatar Johannes Christ2023-12-17-0/+93
| | | | | | Add a new model for the bot to store its mailing list state in, as opposed to the current JSON blob in the BotSetting table. Migrate the existing settings from the BotSetting table into the new model.
* Log a warning when being ratelimtted by GithubGravatar Chris Lovering2023-12-11-0/+16
|
* Unify frozen fields logic into serializer mixin (#1169)Gravatar jchristgit2023-12-11-1/+9
| | | | Additionally, implement frozen fields on the offensive message serializer.
* Implement editing of offensive message records (#1165)Gravatar jchristgit2023-12-11-21/+47
| | | | | | | Allow changing the deletion date of offensive message records in case the bot encounters an error during deletion attempts. Fixes #364. Unblocks python-discord/bot#1013.
* Implement the github-filter worker in the APIGravatar Johannes Christ2023-12-11-0/+46
| | | | | | | | | | | | The current github-filter worker, found at https://github.com/python-discord/workers/blob/main/github-filter/src/index.ts, fails to work at present because Discord's webhook endpoints block Cloudflare's IP ranges from accessing this endpoint. Whilst they use Cloudflare to guard themselves, it seems they do not wish others to use it. Implement it on the site to circumvent IP restrictions and allow to modify the code in Python.
* Pleasure the style dictatorGravatar Johannes Christ2023-07-24-2/+2
|
* Use the new datetime.UTC alias over datetime.timezone.utcGravatar Chris Lovering2023-05-13-52/+52
|
* Specify file encoding so tests pass on windowsGravatar Chris Lovering2023-05-13-1/+1
| | | | This file has non-cp1252 characters, which is the default on windows, so fails to read the file.
* Switch to ruff for lintingGravatar Johannes Christ2023-05-10-115/+125
|
* Crosscheck rules between API and static rulesGravatar Johannes Christ2023-04-21-0/+38
|
* Make additional_settings non-null with dict defaultGravatar Boris Muratov2023-04-06-1/+2
| | | | This makes sure that the value in the DB is always a valid JSON, ensuring the unique constraint will work properly.
* Add maximum auto-timeout duration validationGravatar Boris Muratov2023-04-05-0/+2
|
* Rename additional_field to additional_settingsGravatar mbaruh2023-03-26-2/+2
|
* Merge branch 'main' into new-filter-schemaGravatar mbaruh2023-03-21-15/+15
|\
| * Migrate infraction type `mute` to `timeout`Gravatar mbaruh2023-03-04-12/+12
| |
* | Update viewsets, fix lintingGravatar mbaruh2023-01-28-8/+16
| |
* | Make filter unique constraint use NULLS NOT DISTINCTGravatar mbaruh2023-01-28-0/+12
| | | | | | | | | | | | The existing constraint was ineffective as null values were considered distinct, and so two filters with the same content and no overrides were considered different. This change uses a new PSQL 15 feature unsupported in django currently, and so it is added with raw SQL.
* | Merge branch 'main' into new-filter-schemaGravatar mbaruh2023-01-27-3/+120
|\|
| * Merge branch 'main' into 2304-link-previous-nomination-threadsGravatar Amrou Bellalouna2022-12-29-0/+84
| |\
| | * Merge branch 'main' into messages-in-past-n-days-endpointGravatar wookie1842022-11-20-3/+4
| | |\
| | * | Include users with no messages in response, and simplify response formatGravatar wookie1842022-11-17-2/+2
| | | |
| | * | Change the endpoint to be a POST not a GETGravatar wookie1842022-11-02-25/+9
| | | |
| | * | Add tests for metricity activity endpointGravatar wookie1842022-10-27-0/+100
| | | |
| * | | add tests for new thread_id validation flowGravatar Amrou Bellalouna2022-11-07-0/+32
| | |/ | |/|
| * | Merge branch 'main' into bot-tagsGravatar Hassan Abouelela2022-10-27-3/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Hassan Abouelela <[email protected]> # Conflicts: # poetry.lock # pydis_site/settings.py # pyproject.toml
| * | Merge branch 'main' into bot-tagsGravatar Hassan Abouelela2022-08-23-5/+10
| |\ \
| * | | Fix Tests For Tag MetadataGravatar Hassan Abouelela2022-08-16-3/+4
| | | | | | | | | | | | | | | | Signed-off-by: Hassan Abouelela <[email protected]>
* | | | Update testsGravatar mbaruh2023-01-27-142/+170
| | | |
* | | | Rename delete_messages to the more generic remove_contextGravatar mbaruh2022-11-09-4/+4
| | | |
* | | | Merge branch 'main' into new-filter-schemaGravatar mbaruh2022-10-07-5/+295
|\ \ \ \ | | |_|/ | |/| |
| * | | Fix B026 Linting ErrorsGravatar Hassan Abouelela2022-09-30-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Hassan Abouelela <[email protected]>
| * | | Fix Unittest Deprecation WarningsGravatar Hassan Abouelela2022-09-04-2/+2
| | |/ | |/| | | | | | | Signed-off-by: Hassan Abouelela <[email protected]>
| * | Explicitly Specify Infraction Time In TestsGravatar Hassan Abouelela2022-08-14-5/+10
| |/ | | | | | | | | | | | | | | | | | | | | | | | | The infraction tests checked that the route returned infractions in the correct order, which is based on insertion time. This can be fragile however, since the insertion time can be very close (or identical) during the tests. That became especially more likely with PR #741 (commit 149e67b4) which improved database access speed. This is fixed by explicitly specifying the insertion time, and spacing them out properly. Signed-off-by: Hassan Abouelela <[email protected]>