aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2024-09-03Make pylint fixes.Alexander_Kabui
2024-09-03Add tests for fetching and populating references.Alexander_Kabui
2024-09-03Add unittests for formatting bib info.Alexander_Kabui
2024-05-27Pylint fixes.Alexander_Kabui
2024-05-27Delete llm obsolete unittestsAlexander_Kabui
2024-01-17fix pylint errorsAlexander_Kabui
2024-01-17temp fix:disable pylint checkAlexander_Kabui
2024-01-17Feature/gn llm refactoring (#147)Alexander Kabui
* refactor code for processing response from fahamu client * Add tests for gn-llm
2023-10-10Remove authentication from GN3Frederick Muriuki Muriithi
Authentication should be handled by the auth server (gn-auth) and thus, this commit removes code handling user authentication from the GN3 system.
2023-09-05Fix C3001: Lambda expression assigned to a variableMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-09-05Remove un-necessary string concatenationMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-09-05Remove pylint skipMunyoki Kilyungi
* gn3/auth/authentication/oauth2/models/oauth2token.py (introspect_token, check_permission): Delete "pylint: disable=[no-self-use]". R0022: Useless option value for 'disable', 'no-self-use' was moved to an optional extension, see https://pylint.pycqa.org/en/latest/whatsnew/2/2.14/summary.html#removed-checkers. * gn3/auth/authentication/oauth2/grants/authorisation_code_grant.py (delete_authorization_code): Ditto. * tests/unit/test_heatmaps.py (test_cluster_traits): Delete "pylint: disable=R0201". R0022: Useless option value for 'disable', 'no-self-use' was moved to an optional extension, see https://pylint.pycqa.org/en/latest/whatsnew/2/2.14/summary.html#removed-checkers. * tests/unit/computations/test_partial_correlations.py (test_tissue_correlation): Ditto. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-09-05Remove unused importMunyoki Kilyungi
* tests/unit/test_file_utils.py: Delete gn3.cache_ipfs_file Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-09-05Replace "escape_string" with safe-query parametersMunyoki Kilyungi
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-09-05Delete IPFS testsMunyoki Kilyungi
* tests/unit/test_file_utils.py (test_cache_ipfs_file_cache_hit, test_cache_ipfs_file_cache_miss): Delete. Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
2023-08-17Fix tests to work with changeszsloan
2023-08-04Remove unused importFrederick Muriuki Muriithi
2023-08-04Remove tests for deleted function.Frederick Muriuki Muriithi
2023-08-02Remove ORM-dependent `insert` functionFrederick Muriuki Muriithi
Remove the object-relation-mapping dependent `insert` function to prevent it being used in the code down the line.
2023-08-02Remove ORM-dependent `fetchall` and `fetchone` functionsFrederick Muriuki Muriithi
Remove Object-Relational Mapping dependent function, `fetchall` and `fetchone` so as to prevent theirs use in the code moving forward.
2023-07-19Extract code dealing with ProbeSets to their own module.Frederick Muriuki Muriithi
2023-07-11Revert "Skip tests broken by Python-3.10 temporarily"Frederick Muriuki Muriithi
This reverts commit f52247c15f3694f3dd5fd0fd79c3e15376137e07.
2023-07-05Skip tests broken by Python-3.10 temporarilyFrederick Muriuki Muriithi
Skip the tests that have been broken by the migrations to Python-3.10 temporarily, until we can fix them.
2023-07-05Update test: create throw-away variableFrederick Muriuki Muriithi
* Commit `b529c700` changes the return value to a tuple of values rather than a single string value. Handle that in the test.
2023-05-30Fix linting errors and failing testsFrederick Muriuki Muriithi
* scripts/register_sys_admin.py: fix linting error * tests/unit/auth/fixtures/oauth2_client_fixtures.py: hash client secret in database. The code expects it hashed in the database.
2023-05-25Set whether resource is publicly viewable on creationFrederick Muriuki Muriithi
2023-04-25auth: Roles: Check for editabilityFrederick Muriuki Muriithi
Some roles should not be user-editable, and as such, we need to check before allowing any edits on such roles. This commit makes that possible.
2023-04-10Migrations for linking genotype files.Frederick Muriuki Muriithi
2023-04-06Fix linting issuesFrederick Muriuki Muriithi
2023-04-06Remove deprecated `gn3.db_utils.database_connector` functionFrederick Muriuki Muriithi
Remove the deprecated function and fix a myriad of bugs that arise from removing the function. Issue: https://issues.genenetwork.org/issues/bugfix_coupling_current_app_and_db_utils
2023-04-04Add tables to link genotype dataFrederick Muriuki Muriithi
2023-03-23tests: Set up fixture and mock out config variableFrederick Muriuki Muriithi
2023-03-22auth: Remove the tables used for linking data to resourcesFrederick Muriuki Muriithi
The way data is linked to the resources needs to be reworked. This commit removes all the existing migration scripts that created the tables formerly used for linking data in preparation for reworking the system.
2023-03-20Fix get_all_species testzsloan
2023-03-09auth: redis data: migrate data in redisFrederick Muriuki Muriithi
Implement the code to migrate the data from redis to SQLite.
2023-03-08auth: users: Use the same basic functions for password hashingFrederick Muriuki Muriithi
To avoid repeating the same thing in multiple places, leading to errors and breakages, reuse the same basic functions for password hashing.
2023-03-06auth: privileges/roles: fix issues caught by tests.Frederick Muriuki Muriithi
2023-02-21auth: migrations: Link to data in main dbFrederick Muriuki Muriithi
Provide the `linked_group_data` table to be used to link to data in the main database. Update the `mrna_resources`, `genotype_resources` and `phenotype_resources` tables to rely on the `linked_group_data` table.
2023-02-10Return empty tuple rather than NothingFrederick Muriuki Muriithi
When user has no roles assigned, return an empty tuple rather than pymonad.maybe.Nothing to ease maintenance.
2023-02-08auth: groups: handle join requests.Frederick Muriuki Muriithi
2023-02-07auth: groups: Enable users to request to join group.Frederick Muriuki Muriithi
2023-02-06auth: resource: Enable viewing the details of a resource.Frederick Muriuki Muriithi
2023-02-03auth: tests: mock token acquisition. Fix minor bugs.Frederick Muriuki Muriithi
2023-02-02auth: Reorganise modules/packages for easier dev and maintenanceFrederick Muriuki Muriithi
Split the views/routes into separate modules each dealing with a narrower scope of the application to aid in maintenance, and help with making the development easier.
2023-01-24tests: Expect exact integer value when applying SI suffix.Arun Isaac
* tests/unit/test_search.py (test_apply_si_suffix_kilo, test_apply_si_suffix_mega, test_apply_si_suffix_giga): Update docstring indicating that we expect the exact integer value.
2023-01-24search: Abstract out parsing of position spec into separate function.Arun Isaac
* gn3/api/search.py (parse_position): New function. (parse_location_field): Use parse_position. * tests/unit/test_search.py: Import parse_position from gn3.api.search. (test_parse_position_close_to_zero_location): New test.
2023-01-23auth: create group: Fix group creation.Frederick Muriuki Muriithi
* gn3/auth/authorisation/checks.py: Enable passing user to authorisation checking function. Raise error on authorisation failure for consistent error handling. * gn3/auth/authorisation/groups.py: Add user to group, updating the privileges as appropriate. * gn3/auth/authorisation/resources.py: Fix resources querying * gn3/auth/authorisation/roles.py: Assign/revoke roles by name * gn3/auth/authorisation/views.py: Create group * migrations/auth/20221108_01_CoxYh-create-the-groups-table.py: Add group_metadata field * tests/unit/auth/fixtures/group_fixtures.py: fix tests * tests/unit/auth/test_groups.py: fix tests * tests/unit/auth/test_resources.py: fix tests * tests/unit/auth/test_roles.py: fix tests
2023-01-21tests: roles - Extract values from Maybe objectFrederick Muriuki Muriithi
2023-01-21tests: Fix linting errorsFrederick Muriuki Muriithi
2023-01-19tests: Add unit tests for search.Arun Isaac
* tests/unit/test_search.py: New file.