aboutsummaryrefslogtreecommitdiff
path: root/tests/integration/conftest.py
AgeCommit message (Collapse)Author
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
2022-12-21gn3: (gn3.random -> gn3.chancy): Rename module to avoid conflicts.Frederick Muriuki Muriithi
Rename the `gn3.random` module to gn3.chancy to avoid conflicts with Python's `random` module. * gn3/random.py -> gn3/chancy.py: rename module * gn3/commands.py: update import * gn3/computations/partial_correlations.py: update import * gn3/computations/qtlreaper.py: update import * gn3/computations/rust_correlation.py: update import * gn3/db/correlations.py: update import * gn3/db/traits.py: update import * gn3/heatmaps.py: update import * tests/integration/conftest.py: update import
2022-03-24Test Fixture: Create new test database and get connection to itFrederick Muriuki Muriithi
Implement a fixture that: * Creates a new test database * Copies over table structure from existing database * Gets connection to new test database and returns it * Cleans up after itself when the tests have run
2022-03-08Fix tests, and issues caught by testsFrederick Muriuki Muriithi
Fix some issues caught by tests due to changes introducing the hand-off of the partial correlations computations to an external process Fix some issues due to the changes that introduce context managers for database connections Update some tests to take the above two changes into consideration
2022-02-21Test partial corrs API with mix of existing and non-existing control traitsFrederick Muriuki Muriithi
Test that the partial correlations endpoint handles a mix of existing and non-existing control traits gracefully and issues a warning to the user. Summary of changes: * gn3/computations/partial_correlations.py: Issue a warning for all non-existing control traits * gn3/db/partial_correlations.py: update queries - use `INNER JOIN` for tables instead of comma-separated list of tables * tests/integration/conftest.py: Add `db_conn` fixture to provide a database connection to the tests. This will probably be changed in the future to connect to a temporary database for tests. * tests/integration/test_partial_correlations.py: Add test to check for correct behaviour with a mix of existing and non-existing control traits
2022-02-17Create client fixture for integration testsFrederick Muriuki Muriithi
Create a client fixture to help with the integration tests