John Davis
104a375ea4
Add get_private_role_user_emails_dict, test
...
Retrieves a mapping of private role ids to associated users' emails.
Used to lookup a user's email when generating a displayed_name for
private roles.
2025-03-11 00:34:22 -04:00
John Davis
c4c66078d8
Factor out get_displayable_roles, add test
2025-03-10 11:13:13 -04:00
John Davis
f2f55131b2
Fix unit tests
2025-03-10 11:13:13 -04:00
John Davis
16f7700ea4
Move method out of managers into model
...
To accommodate package unit testing
2024-11-20 16:52:23 -05:00
John Davis
b3e57cb9a2
Cleanup sharing roles on user purge, refactor, test
...
1. Update sharing role name removing purged user email
2. If sharing role has only one user association, delete it.
3. Factor out cleanup, add test.
Note: this will not work if user email has been udpated after the sharing
role was created.
2024-11-20 16:52:23 -05:00
John Davis
4be1eaf692
Update unit test w/new method name
2024-10-31 09:28:49 -04:00
John Davis and David López
4a7eb0a6ec
Fix typo
...
Co-authored-by: David López <46503462+davelopez@users.noreply.github.com >
2024-10-31 09:25:48 -04:00
John Davis
16f1d3f0e3
Fix error in select, add test
...
We must use a union because when we retrieve roles with a query, we
check against:
1) role name
2) email of associated user for private roles
We factor out this select into a helper method, which we then test
extensively.
2024-10-30 15:28:47 -04:00
John Davis
0e51a52272
Move test fixture to conftest
2024-10-30 15:28:47 -04:00
John Davis
f623ee851f
Adjust unit test: role name == user's current email
2024-10-30 15:28:47 -04:00
John Davis
00bebee7c7
Add test exposing bug
...
After user's email has been modified, we can't retrieve sharing roles
for that user
2024-10-04 14:44:41 -04:00
John Davis
2fc21f9962
Do not pass unnecessary arguments
2024-09-23 17:05:15 -04:00
John Davis
6c4ddeb91d
Test that private roles are not assignable
2024-09-23 17:05:15 -04:00
John Davis
8c4a90010a
Add tests for user and history default permissions
2024-09-23 17:05:15 -04:00
John Davis
19d76e9580
Fix mypy: statements are reachable
2024-09-23 17:05:15 -04:00
John Davis
4fb1c704d6
Rename verify_items helper to have_same_elements
...
Improves readability of test code
2024-09-23 15:49:01 -04:00
John Davis
004d46c7a4
Fix test database handling for db tests
2024-09-23 14:22:59 -04:00
John Davis
7739134485
Add unit tests for user/group/role associations
2024-09-23 14:22:59 -04:00
John Davis
4471c6a851
Refactor tests to reduce duplication
2024-09-21 00:17:20 -04:00
John Davis
0712fbf538
Add test_history_update
2024-06-10 15:48:10 -04:00
John Davis
1d7d65568b
Convert + improve test_job/task_metrics
2024-06-10 15:48:10 -04:00
John Davis
65530c9d59
Drop unused fixture arg
2024-06-10 15:48:10 -04:00
John Davis
5123c39298
Convert test_metadata_spec
2024-06-10 15:48:10 -04:00
John Davis
c8df2fdf30
Convert test_get_display_name
2024-06-10 15:48:10 -04:00
John Davis
23ae962bbf
Convert hid tests
2024-06-10 15:48:10 -04:00
John Davis
2d4a65d915
Convert test_current_galaxy_sesssion
2024-06-10 15:48:10 -04:00
John Davis
da3c885800
Convert test_history_contents
2024-06-10 15:48:10 -04:00
John Davis
9572a93ac4
Convert test_ratings
2024-06-10 15:48:10 -04:00
John Davis
51ffbfd432
Convert test_default_disk_usage
2024-06-10 15:48:10 -04:00
John Davis
558d8364e9
More test-galaxy-mapping conversions
2024-06-10 15:48:10 -04:00
John Davis
bc6fb8953d
Improve test: enable db triggers; do not verify HistoryAudit table
...
We do not verify the counts of rows in the HistoryAudit table because
with the db trigger enabled, those rows are created automatically.
Although it is possible to calculate the expected counts, those numbers
would be dependend on previous db statements executed in the same test,
and that calculation would be not straightforward, making the test
brittle and confusing.
2024-06-10 15:48:10 -04:00
John Davis
7ad6d43418
Start replacing test_galaxy_mapping w/data access tests
2024-06-10 15:48:10 -04:00
John Davis
4aaed3e2c9
Move+test get_roles_by_ids
2024-06-10 15:48:10 -04:00
John Davis
f91bd11052
Test User.username model definition (unique constraint)
2024-06-10 15:48:10 -04:00
John Davis
4329a5e603
webapps.galaxy.services.user.get_users_for_index: test + factor out
2024-06-10 15:48:10 -04:00
John Davis
fabce5bdc4
security.get_private_user_role: test + factor out
2024-06-10 15:48:10 -04:00
John Davis
b8e05af3be
security.get_npns_roles: test + factor out
2024-06-10 15:48:10 -04:00
John Davis
fd7179273a
Move+test get_users_by_ids
2024-06-10 15:48:10 -04:00
John Davis
0c840d025f
Add first user data access tests
2024-06-10 15:48:10 -04:00
John Davis
71b9e4b971
Add first library data access tests
...
- factor out db access from lib manager;
- add unit tests
- move data access functions from managers.libraries to model.db.libraries
2024-06-10 15:48:10 -04:00
John Davis
7f83b903cb
Add history pruner + test
...
Add __init__.py to test.unit.data.model.db
2024-05-02 14:12:35 -04:00
John Davis
2652ec6510
Add conftest.py for db tests
2024-05-02 14:12:35 -04:00