isabelrem / 2023-Software-Development-Assessment

MIT License
2 stars 1 forks source link

Tests #34

Closed jess789550 closed 11 months ago

jess789550 commented 11 months ago

Test written for all API stuff. SQL db is not working properly yet so will be tested at a later date. Please keep init.py files in the folders. I will update the readthedocs and other docs. Thanks

jess789550 commented 11 months ago

WARNING: code in PanelSearch folder now includes "PanelSearch." otherwise pytest does not work. However, "python main.py" gives ModuleNotFoundError on command line.

jess789550 commented 11 months ago

WARNING: code in PanelSearch folder now includes "PanelSearch." otherwise pytest does not work. However, "python main.py" gives ModuleNotFoundError on command line.

FIXED by modifying init.py

TomLivesey-UoM commented 11 months ago

I have manually resolved the merge conflicts with the dev branch - most were only small issues of commented out lines having been deleted BUT please delete pycache files which aren't 100% necessary before requesting a merge as this can cause complex merge conflicts if in both branches.

TomLivesey-UoM commented 11 months ago

I have resolved the ModuleNotFoundError - was an issue with different local environments and testing using different commands - the test for test_select_disease.py fails due to a TypeError of the get_clinical_indications() function of it being given too many arguments.

This is due to it no longer needing to have the api url given to the function as, as it was always the same, it's now hard-coded into the function.

Thus, the tests for this function to check if the url is correct or incorrect are no longer necessary.

TomLivesey-UoM commented 11 months ago

I have resolved the issues and will now merge