Problem with the API library when running pytest

The problem I’m stuck on is on this challenge, https://graphacademy.neo4j.com/courses/app-python/2-interacting/4-home-page/

It seems the API library might not be in scope of the import call?

When I try to run the test, per the instructions, ‘python -m pytest -s tests/02_movie_list__test.py’
I get the error (see API_Error_) screenshot attached. It says

ModuleNotFoundError: No module named api.neo4j.

So, whoever made this test made a library with a bunch of compiled (pyc) python scripts. So I don't know what's wrong with it.

I confirmed, by commenting them out, that the problem is with the imports from api in both the 02_movie_list__test.py and the conftest.py files

I’m wondering if I put my ‘neoflix/scripts’ directory too deep (it’s at the same level as the ‘app-python’ folder), and I need to put the app-python in it?

Might be. I was able to run the test just fine with my neoflix folder within the app-python folder - at the same level as the api folder.

image

1 Like