aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Expand)Author
2022-11-15pylint: Fix linting errors.Frederick Muriuki Muriithi
2022-11-15tests: typo: fix migration script file nameFrederick Muriuki Muriithi
2022-11-15tests: Use `gn3.auth.db` functions for db connection and cursor...* tests/unit/auth/conftest.py: use the functions in `gn3.auth.db` to acquire the database connection and cursor since they handle some of the basic issues like rollback and commit, meaning we do not have to explicitly handle said issues in the fixtures. Frederick Muriuki Muriithi
2022-11-15tests: Fix cause of `DeprecationWarning`...* tests/unit/auth/test_groups.py: use Flask's application context directly rather than the request context to access `g` in order to get rid of the `DeprecationWarning`. Frederick Muriuki Muriithi
2022-11-14auth: Implement `create_group`Frederick Muriuki Muriithi
2022-11-14tests: split test app and test client...* The test app and the test client are both needed as fixtures in different places Frederick Muriuki Muriithi
2022-11-14Migrations: Create `user_roles` table...* migrations/auth/20221114_05_hQun6-create-user-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 Frederick Muriuki Muriithi
2022-11-14auth: Add test for `create_group`...* gn3/auth/authorisation/__init__.py: Add `authorised_p` decorator to be used for all function requiring authorisation. * gn3/auth/authorisation/groups.py: Add `create_group` function stub * tests/unit/auth/conftest.py: Add fixture for test users * tests/unit/auth/test_groups.py: Add tests for `create_group` Frederick Muriuki Muriithi
2022-11-14Migrations: Create the `group-leader` role and give it privileges...* 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 Frederick Muriuki Muriithi
2022-11-14Migrations: Create `group_roles` table...* 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 Frederick Muriuki Muriithi
2022-11-14Migrations: Drop `generic_role*` tables...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 Frederick Muriuki Muriithi
2022-11-14Rename files for consistency...* Name all tests that test migrations to start with `test_migrations_` Frederick Muriuki Muriithi
2022-11-14Migrations: Add generic_role_privileges table...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 Frederick Muriuki Muriithi
2022-11-14Migrations: Migration for initial privileges...* 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. Frederick Muriuki Muriithi
2022-11-10Migrations: Add columns to 'privileges' table...* 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 Frederick Muriuki Muriithi
2022-11-10Tests: Generalise tests for adding/removing columns to/from tablesFrederick Muriuki Muriithi
2022-11-10Migrations: migration for `role_privileges` table...* tests/unit/auth/test_create_table_migrations.py: new migration * tests/unit/auth/test_migrations_indexes.py: test new migration Frederick Muriuki Muriithi
2022-11-10Migrations: migration for 'generic_roles' table...* migrations/auth/20221110_06_Pq2kT-create-generic-roles-table.py: new migration * tests/unit/auth/test_create_table_migrations.py: test new migration Frederick Muriuki Muriithi
2022-11-10Migrations: migration for 'roles' table...* 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 Frederick Muriuki Muriithi
2022-11-10Migrations: migration for 'genotype_resources' table...* migrations/auth/20221110_04_6PRFQ-create-genotype-resources-table.py: new migration * tests/unit/auth/test_create_table_migrations.py: test new migration Frederick Muriuki Muriithi
2022-11-10Migrations: Add migration for 'phenotype_resources' table...* migrations/auth/20221110_03_ka3W0-create-phenotype-resources-table.py: new migration * tests/unit/auth/test_create_table_migrations.py: test for new migration Frederick Muriuki Muriithi
2022-11-10Migrations: Add migration for mrna_resources table...* migrations/auth/20221110_02_z1dWf-create-mrna-resources-table.py: new migration * tests/unit/auth/test_create_table_migrations.py: test for new migration Frederick Muriuki Muriithi
2022-11-10Migrations: Add migration for 'resources' table...* 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 Frederick Muriuki Muriithi
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....* 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. Frederick Muriuki Muriithi
2022-11-08Migrations: Init `resource_categories` with initial categories...* 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. Frederick Muriuki Muriithi
2022-11-08Migrations: Create `resource_categories` table....* migrations/auth/20221108_03_Pbhb1-create-resource-categories-table.py: new migration. * tests/unit/auth/test_create_table_migrations.py: test new migration. Frederick Muriuki Muriithi
2022-11-08Migrations: Create `privileges` table....* migrations/auth/20221108_02_wxTr9-create-privileges-table.py: new migration * tests/unit/auth/test_create_table_migrations.py: test new migration Frederick Muriuki Muriithi
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' migrations...* 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 Frederick Muriuki Muriithi
2022-11-08Tests: Tests the credentials check system...* gn3/auth/authentication.py: Fix issues caught by tests * tests/unit/auth/test_credentials.py: Add fixtures and tests for credentials checking Frederick Muriuki Muriithi
2022-11-08Tests: Test migration to create user_credentials table...* tests/unit/auth/test_create_user_credentials_table.py: new tests Frederick Muriuki Muriithi
2022-11-08Tests: Separate *ALL* unit test fixtures from auth-specific ones...* 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. Frederick Muriuki Muriithi
2022-11-03Add credentials checking...* 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 Frederick Muriuki Muriithi
2022-11-03Rename migration test.Frederick Muriuki Muriithi
2022-11-03Initialise the Auth(entic|oris)ation packages...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 Frederick Muriuki Muriithi
2022-11-02Add tests for monadic_dict...* tests/unit/test_monads.py (test_monadic_dict): Add basic test-cases for MonadicDict. Munyoki Kilyungi
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 tests...* 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 Frederick Muriuki Muriithi
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