covid19-api icon indicating copy to clipboard operation
covid19-api copied to clipboard

Testing with pytest needs to be updated folder changes with integrators.

Open owenduncansnobel opened this issue 3 years ago • 3 comments

Describe the bug When the project was refactored (integrators implemented) the tests used in the test folder with pytest broke since the file paths are different. V2 and V1 both break.

To Reproduce Steps to reproduce the behavior:

  1. Clone project run
  2. run pytest
  3. See errors

Expected behavior After running pytest you will see errors from incorrect imports of the models and utils folder and integrator instance name is different from the older version. Screenshots image

Additional context I will update the file paths and make a PR, but their will need to be added testing implemented for each method if you are wishing to verify the correct model used for each method in the integrator file.

owenduncansnobel avatar Mar 13 '21 04:03 owenduncansnobel

Thank you for your contribution!!' first issue

github-actions[bot] avatar Mar 13 '21 04:03 github-actions[bot]

This update / PR is related, testing will still need to be added to integrators if you wish to use / implement with TravisCI https://github.com/nat236919/covid19-api/pull/70/commits/b22539b080d491d806fd4044a69c73d4e249b4ae

owenduncansnobel avatar Mar 13 '21 04:03 owenduncansnobel

@owen-duncan-snobel Currently tests are only implemented with test_get_data.py and test_helper.py

I have been having a problem with test_covid_integrator_api_v1.py and test_covid_integrator_api_v2.py as you have noticed. Unfortunately, no solution on my part so far.

Ref: https://github.com/nat236919/covid19-api/tree/development/app/tests

nat236919 avatar Mar 16 '21 03:03 nat236919