aboutsummaryrefslogtreecommitdiff
path: root/wqflask/tests/unit/base
AgeCommit message (Collapse)Author
2022-12-01Reproduce ValueError when query_sql returns NoneMunyoki Kilyungi
* wqflask/tests/unit/base/test_data_set.py (TestDatasetAccessionId): New test cases.
2022-12-01Delete complicated unmaintainable test-cases marked for skippingMunyoki Kilyungi
* wqflask/tests/unit/base/test_data_set.py (TestDataSetTypes) [test_set_dataset_key_mrna, test_set_dataset_key_pheno, test_set_dataset_geno]: Delete.
2022-10-14Update mock: Return correct test data.Frederick Muriuki Muriithi
2022-09-22Provide database cursor as argument for TheSpecies and ChromosomesFrederick Muriuki Muriithi
Provide the database cursor as an argument to the methods of the two classes: * wqflask.base.species.TheSpecies * wqflask.base.species.Chromosomes Also update dependent code to initialise and pass the cursor where these classes are used.
2022-09-22Update tests: pass in missing arguments.Frederick Muriuki Muriithi
2022-09-20Decompose file into separate modulesrefactor-data_set_py-20220920Frederick Muriuki Muriithi
To ease future refactors on the code, decompose the file into a module with multiple modules that can be refactored semi-independently.
2022-09-08Test the creation of the_species, indchromosomes and chromosome objsMunyoki Kilyungi
* wqflask/tests/unit/base/test_species.py (TestTheSpecies): Delete. (TestIndChromosome): Move to pytest and parametrize. (TestChromosomes): Ditto. (test_species): Ditto. (test_create_ind_chromosome): Ditto. (test_create_chromosomes): Ditto.
2022-09-08Use "%s" in sql queryMunyoki Kilyungi
* wqflask/base/mrna_assay_tissue_data.py: Delete db_tools. (MrnaAssayTissueData.get_symbol_values_pairs): Re-format query. * wqflask/tests/unit/base/test_mrna_assay_tissue_data.py: (test_get_trait_symbol_and_tissue_values): Add test for above.
2022-09-08Move test case to mrna_assay_tissue_data test moduleMunyoki Kilyungi
* wqflask/tests/unit/base/test_mrna_assay_tissue_data.py * wqflask/tests/unit/wqflask/correlation/test_correlation_functions.py (TestCorrelationFunctions.test_tissue_corr_computation): Delete. (TestCorrelationFunctions): Move this ... (test_mrna_assay_tissue_data_initialisation): ... here
2022-09-08Inject database connection to mrna_assay_tissue_data classMunyoki Kilyungi
* wqflask/base/mrna_assay_tissue_data.py: Imports: Delete database_connection, escape, and database_connector. (MrnaAssayTissueData): Inject conn. Re-format queries. Rework 'if ... else' logic. Re-work how results are assigned to 'self.data[symbol]' - remove dot-notation. (MrnaAssayTissueData.get_symbol_values_pairs): Move box-comments to doc-string. Rework how results are assigned to 'symbol_values_dict' - remove dot-notation. * wqflask/tests/unit/base/test_mrna_assay_tissue_data.py (test_mrna_assay_tissue_data_initialisation): New test. * wqflask/wqflask/correlation/correlation_functions.py: Import database_connection. (get_trait_symbol_and_tissue_values): Inject conn object.
2022-09-08Replace "g.db" mocks with "database_connection" mocksMunyoki Kilyungi
* wqflask/tests/unit/base/test_trait.py: Delete "wqflask.app" import. (TestRetrieveTraitInfo.setUp): Delete it. (TestRetrieveTraitInfo.tearDown): Ditto. (TestRetrieveTraitInfo.test_retrieve_trait_info_with_empty_dataset): Replace "g" mock with "database_connection" mock. (test_retrieve_trait_info_with_empty_trait_info): Ditto. (test_retrieve_trait_info_with_non_empty_trait_info): Ditto. (test_retrieve_trait_info_utf8_parsing): Ditto. * wqflask/tests/wqflask/show_trait/test_show_trait.py (TestTraits): (test_get_nearest_marker): Ditto. (test_get_nearest_marker_empty_db): Ditto.
2022-09-08Move data.gen_menu_json to test_data_set.pyMunyoki Kilyungi
This is done to avoid relative imports. wqflask/tests/unit/base/data.py: Delete it. * wqflask/tests/unit/base/test_data_set.py: Add new variable GEN_MENU_JSON. (TestDataSetTypes.test_data_set_type_with_empty_redis): Upper-case "gen_menu_json" variable.
2022-03-17Skip unittestsBonfaceKilz
These tests touch on core data-structures in gn2; and there's a chance that refactoring said data-structures may break many things.
2021-05-05tests: test_species: Update failing testsBonfaceKilz
2021-05-05templates: test_species: Add tests for instantiating ChromosomesBonfaceKilz
2021-05-05tests: test_species: Test that IndChromosome instantiates correctlyBonfaceKilz
2021-05-05tests: test_species: Add test cases for TestTheSpecies classBonfaceKilz
2021-04-30autopep8: Fix E121,E122,E123,EI24,E125,E126,E127,E128,E129,E131,E133BonfaceKilz
2021-04-30autopep8: Fix W504BonfaceKilz
2021-04-30autopep8: Fix E301,E302,E303,E304,E305,E306BonfaceKilz
2021-04-29tests: test_data_set: Update testBonfaceKilz
2021-04-29tests: unit: test_data_set: Remove unused mockBonfaceKilz
2020-11-03Separate unittests from integration testsBonfaceKilz