Tillman
c9c1404c9f
Remove redudant code
2023-07-31 11:00:11 +02:00
Tillman
6430155ac0
Refactor tests for UserAPI to make use of custom request types
2023-07-31 11:00:10 +02:00
Tillman
3a67001fc7
Extend test for index operation
2023-07-31 11:00:10 +02:00
Tillman
cf14a45ee9
Adapt API tests to use JSON payload
2023-07-31 11:00:10 +02:00
Tillman
079c09a5b9
Add tests for show operations
2023-07-31 11:00:10 +02:00
Tillman
2a74d24e5b
Add test for set_theme operation
2023-07-31 11:00:10 +02:00
Jonathan Laperle
d896d8096a
Test for 204 with admin key
2023-06-27 08:45:49 -07:00
Jonathan Laperle
c8fbf8fa51
Prevent API access with deleted key
2023-06-27 08:45:35 -07:00
Nicola Soranzo
bc15e2c63b
Merge branch 'release_23.0' into dev
2023-02-02 01:28:48 +00:00
Nicola Soranzo
30f60493c3
Format Python code with black 23.1.0
...
with manual fixes to 3 files to make them compatible with black 22.12.0 .
We need to keep black pinned at `<23` until we vendorise `packaging`, since
the new version of black depends on `packaging >=22.0` which is the version
where `LegacyVersion` (which we use for tool lineages) was removed.
2023-02-01 23:51:03 +00:00
John Chilton
9ed8bc717b
Decorate API user tests properly.
2023-01-26 13:39:37 -05:00
Benno Weiss
199f0362df
make format
2022-12-07 12:30:30 +01:00
Benno Weiss
9865c2a447
migrate endpoints to fastapi and add tests
2022-12-07 12:09:53 +01:00
Nicola Soranzo
0391cd4b62
Rename FooBarTestCase test classes as TestFooBar in API, framework, performance, Selenium and ToolShed tests
...
These are collected by pytest only because they are `unittest.TestCase` derived,
but normally pytest collects only test classes whose name starts with `Test`, see
https://docs.pytest.org/en/7.1.x/reference/reference.html#confval-python_classes
Also:
- Some type annotations
2022-10-15 17:54:31 +01:00
davelopez
38207dbcd8
Refactor delete API key to mark as deleted all keys
...
This will make sure any user with multiple created keys will mark them as deleted as soon as the first one is deleted.
2022-09-30 16:39:12 +02:00
davelopez
fb8172faad
Restore old API behavior and add detailed endpoint
...
The existing endpoints will return the API key as a plain string and the `GET /api/users/{user_id}/api_key` route will get or create the key as it used to be.
2022-09-30 16:39:12 +02:00
davelopez
b8058692b5
Add API tests coverage for API key management
2022-09-30 16:39:12 +02:00
davelopez
36f8647b36
Fix user handling in api_key endpoints
2022-09-30 16:39:12 +02:00
Alireza Heidari
2a14c2f956
Fix create api key test
2022-09-30 16:39:12 +02:00
Nicola Soranzo
a69103dd2c
Replace `self.assert* method calls with plain asserts in lib/galaxy_test/`
...
using https://github.com/pytest-dev/unittest2pytest with the following command:
```
unittest2pytest -f self_assert -w -n lib/galaxy_test/
```
2022-09-21 23:50:04 +01:00
John Chilton
252fc386f8
Slightly modernized and standardized API error handling.
...
- Improved error handling and cleanup a past-John TODO.
- Moves "api/users/current" logic into a central place and allows that paradigm to work for user update.
- Downstream this abstraction allows that logic to be used for disk usage stuff as well.
- Cleans up object store selection branches in other small ways.
2022-06-21 11:13:50 -04:00
Matthias Bernt
131be30816
adapt test for too short user name
2022-04-21 16:58:41 +02:00
Dannon Baker
623a5e165a
Apply black formatting.
...
Apply isort.
2022-02-03 07:42:20 -05:00
Dannon Baker
22e7601653
First pass fstring conversion
2021-05-11 13:47:00 -04:00
Nate Coraor
c9f698ad75
Merge remote-tracking branch 'upstream/release_21.01' into dev
2021-01-28 17:56:01 -05:00
davelopez
19ad0fcb8f
Add simple test to check api key is created
2021-01-28 15:33:36 +01:00
Nicola Soranzo
d26b3d9848
Fix all E203, E741 and W504 flake8 errors
2021-01-18 10:35:41 +00:00
Dannon Baker
434d406bde
Cleanout communication server.
...
I don't think anyone's actively using this anymore, and most
communication has moved to (also embeddable) things like Gitter, etc.
2020-10-22 09:58:34 -04:00
Dannon Baker
3de5d7ac5d
Merge remote-tracking branch 'upstream/dev' into py3-compat-drop
2020-07-20 11:40:25 -04:00
John Chilton
ad87c011c9
Eliminate self.security from API tests (breaks abstractions).
2020-07-02 17:00:03 -04:00
Dannon Baker
9ebf5f36d1
Update string formatting in rest of lib
2020-06-26 08:24:02 -04:00
John Chilton
d04c020747
Migrate api tests into lib/galaxy_test for packaging.
2019-11-12 09:05:08 -05:00