aboutsummaryrefslogtreecommitdiff
path: root/tests/unit
AgeCommit message (Collapse)Author
2022-11-14Migrations: Create the `group-leader` role and give it privilegesFrederick Muriuki Muriithi
* migrations/auth/20221114_04_tLUzB-initialise-basic-roles.py: new migration * tests/unit/auth/test_migrations_insert_data_into_empty_table.py: test new migration
2022-11-14Migrations: Create `group_roles` tableFrederick Muriuki Muriithi
* migrations/auth/20221110_05_BaNtL-create-roles-table.py: modify migration * migrations/auth/20221114_03_PtWjc-create-group-roles-table.py: new migration * tests/unit/auth/test_migrations_create_tables.py: test new migration * tests/unit/auth/test_migrations_indexes.py: test new migration
2022-11-14Migrations: Drop `generic_role*` tablesFrederick Muriuki Muriithi
Drop the `generic_role*` tables, since what they were envisioned for can be handled a different, (arguably) more simple way. * migrations/auth/20221114_02_DKKjn-drop-generic-role-tables.py: new migration * tests/unit/auth/test_migrations_drop_tables.py: test new migration
2022-11-14Rename files for consistencyFrederick Muriuki Muriithi
* Name all tests that test migrations to start with `test_migrations_`
2022-11-14Migrations: Add generic_role_privileges tableFrederick Muriuki Muriithi
Add table `generic_role_privileges` table to link the generic roles to the privileges they provide. * migrations/auth/20221114_01_n8gsF-create-generic-role-privileges-table.py: new migration * tests/unit/auth/test_create_table_migrations.py: test new migration * tests/unit/auth/test_migrations_indexes.py: test new migration
2022-11-14Migrations: Migration for initial privilegesFrederick Muriuki Muriithi
* migrations/auth/20221113_01_7M0hv-enumerate-initial-privileges.py: new migration. * tests/unit/auth/test_migrations_insert_data_into_empty_table.py: test new migration.
2022-11-10Migrations: Add columns to 'privileges' tableFrederick Muriuki Muriithi
* migrations/auth/20221110_08_23psB-add-privilege-category-and-privilege-description-columns-to-privileges-table.py: new migration * tests/unit/auth/test_migrations_add_remove_columns.py: test new migration
2022-11-10Tests: Generalise tests for adding/removing columns to/from tablesFrederick Muriuki Muriithi
2022-11-10Migrations: migration for `role_privileges` tableFrederick Muriuki Muriithi
* tests/unit/auth/test_create_table_migrations.py: new migration * tests/unit/auth/test_migrations_indexes.py: test new migration
2022-11-10Migrations: migration for 'generic_roles' tableFrederick Muriuki Muriithi
* migrations/auth/20221110_06_Pq2kT-create-generic-roles-table.py: new migration * tests/unit/auth/test_create_table_migrations.py: test new migration
2022-11-10Migrations: migration for 'roles' tableFrederick Muriuki Muriithi
* migrations/auth/20221110_05_BaNtL-create-roles-table.py: new migration * tests/unit/auth/test_create_table_migrations.py: test new migration * tests/unit/auth/test_migrations_indexes.py: test new migration
2022-11-10Migrations: migration for 'genotype_resources' tableFrederick Muriuki Muriithi
* migrations/auth/20221110_04_6PRFQ-create-genotype-resources-table.py: new migration * tests/unit/auth/test_create_table_migrations.py: test new migration
2022-11-10Migrations: Add migration for 'phenotype_resources' tableFrederick Muriuki Muriithi
* migrations/auth/20221110_03_ka3W0-create-phenotype-resources-table.py: new migration * tests/unit/auth/test_create_table_migrations.py: test for new migration
2022-11-10Migrations: Add migration for mrna_resources tableFrederick Muriuki Muriithi
* migrations/auth/20221110_02_z1dWf-create-mrna-resources-table.py: new migration * tests/unit/auth/test_create_table_migrations.py: test for new migration
2022-11-10Migrations: Add migration for 'resources' tableFrederick Muriuki Muriithi
* gn3/migrations.py: Minor change * migrations/auth/20221110_01_WtZ1I-create-resources-table.py: new migration * tests/unit/auth/test_create_table_migrations.py: test new migration
2022-11-09Migrations: Add `resource_meta` field to `resource_categories` tableFrederick Muriuki Muriithi
2022-11-09Tests: Provide backend fixture to (apply|rollback)_single_migrationFrederick Muriuki Muriithi
2022-11-08Migrations: Improve `resource_categories` data tests.Frederick Muriuki Muriithi
* tests/unit/auth/test_migration_init_data_in_resource_categories_table.py: Test that the data is initialised properly. Test that rollback works as expected.
2022-11-08Migrations: Init `resource_categories` with initial categoriesFrederick Muriuki Muriithi
* migrations/auth/20221108_04_CKcSL-init-data-in-resource-categories-table.py: new migration. * tests/unit/auth/test_migration_init_data_in_resource_categories_table.py: test new migration.
2022-11-08Migrations: Create `resource_categories` table.Frederick Muriuki Muriithi
* migrations/auth/20221108_03_Pbhb1-create-resource-categories-table.py: new migration. * tests/unit/auth/test_create_table_migrations.py: test new migration.
2022-11-08Migrations: Create `privileges` table.Frederick Muriuki Muriithi
* migrations/auth/20221108_02_wxTr9-create-privileges-table.py: new migration * tests/unit/auth/test_create_table_migrations.py: test new migration
2022-11-08Tests: Fix test name.Frederick Muriuki Muriithi
2022-11-08Tests: Fix typo: remove variable from quotes.Frederick Muriuki Muriithi
2022-11-08Tests: Generalise testing 'CREATE TABLE' migrationsFrederick Muriuki Muriithi
* gn3/settings.py: Omit trailing slash * tests/unit/auth/test_create_table_migrations.py: Generalise testing migrations that create tables. * tests/unit/auth/test_create_user_credentials_table.py: delete * tests/unit/auth/test_migration_create_users_table.py: delete
2022-11-08Tests: Tests the credentials check systemFrederick Muriuki Muriithi
* gn3/auth/authentication.py: Fix issues caught by tests * tests/unit/auth/test_credentials.py: Add fixtures and tests for credentials checking
2022-11-08Tests: Test migration to create user_credentials tableFrederick Muriuki Muriithi
* tests/unit/auth/test_create_user_credentials_table.py: new tests
2022-11-08Tests: Separate *ALL* unit test fixtures from auth-specific onesFrederick Muriuki Muriithi
* tests/unit/auth/conftest.py: add fixtures specific to auth * tests/unit/auth/test_migration_create_users_table.py: import from new fixtures module * tests/unit/conftest.py: remove auth-specific fixtures from *ALL* unit tests fixture module.
2022-11-03Add credentials checkingFrederick Muriuki Muriithi
* gn3/auth/authentication.py: new function `credentials_in_database` * gn3/auth/authentication/__init__.py: replace package with module * gn3/settings.py: new `AUTH_MIGRATIONS` configuration variable * migrations/auth/20221103_02_sGrIs-create-user-credentials-table.py: new migration * tests/unit/auth/test_credentials.py: test the `credentials_in_database` function * tests/unit/conftest.py: more test fixtures
2022-11-03Rename migration test.Frederick Muriuki Muriithi
2022-11-03Initialise the Auth(entic|oris)ation packagesFrederick Muriuki Muriithi
Initialise the authentication/authorisation system packages and set up the initial database migrations to set up the system. * README.md: Add documentation on migrations * gn3/auth/__init__.py: init package * gn3/auth/authentication/__init__.py: init package * gn3/auth/authorisation/__init__.py: init package * gn3/migrations.py: provide migration utilities * migrations/auth/20221103_01_js9ub-initialise-the-auth-entic-oris-ation-database.py: new migration * tests/unit/auth/test_init_database.py: test new migration applies and rolls back as expected * tests/unit/conftest.py: fixtures for unit tests * yoyo.auth.ini: basic configuration for yoyo-migration for auth system migrations
2022-11-02Add tests for monadic_dictMunyoki Kilyungi
* tests/unit/test_monads.py (test_monadic_dict): Add basic test-cases for MonadicDict.
2022-08-30Update test: include port in parsed data from mysql uriFrederick Muriuki Muriithi
2022-08-10update test;parse outputAlexander_Kabui
2022-07-29Fix failing testsFrederick Muriuki Muriithi
* gn3/computations/correlations.py: rename function * mypy.ini: deactivate mypy error about missing imports * tests/integration/test_correlation.py: mock correct function * tests/unit/computations/test_correlation.py: test correct function
2022-07-22linting and tests fixesAlexander_Kabui
2022-07-22mypy pylint fixesAlexander_Kabui
2022-07-22add unittestsAlexander_Kabui
2022-06-29use explicit parametersAlexander_Kabui
2022-06-29fix issuesAlexander_Kabui
2022-06-29lint test fileAlexander
2022-06-29add testsAlexander
2022-06-29add test dataAlexander
2022-06-29parse output dataAlexander
2022-06-29init test correlation rust moduleAlexander
2022-06-21tests: test_file_utils: Replace pytest.mark.skip with unittest.skipBonfaceKilz
"python setup.py test" won't skip "pytest.mark.skip" thereby leading to build failure when you try to package gn3.
2022-06-21test_file_utils: Disable test cases for "cache_ipfs_file"BonfaceKilz
* tests/unit/test_file_utils.py (test_cache_ipfs_file_cache_hit): Skip it. (test_cache_ipfs_file_cache_miss): Ditto.
2022-05-30Pass trait data as args to `fix_strains` and fix some bugsFrederick Muriuki Muriithi
The `fix_strains` function works on the trait data, not the basic trait info. This commit fixes the arguments passed to the function, and also some bugs in the function.
2022-05-27Move sql for CRUD operations on case-attrs from gn2 to gn3BonfaceKilz
2022-05-27Move sql for modifying case-attributes from gn2 to gn3BonfaceKilz
2022-05-27Return all the results from CaseAttributes column as isBonfaceKilz
* gn3/db/sample_data.py: Remove "collections" import. Add "Optional" import. (get_case_attributes): Return the results of "fetchall" from the case attributes. * tests/unit/db/test_sample_data.py (test_get_case_attributes): Update failing test.