Reputation: 496
The attached image is to show the file hierarchy. No problem with the code.
I'm trying to create a simple class testing but when I run post_test.py, I'm getting an error: ModuleNotFoundError: No module named 'post'
I'm not sure what is wrong with the hierarchy of the files and why it cannot find the class.
Upvotes: 0
Views: 30
Reputation: 51
in post_test.py, try replacing
from post import Post
with
from blog.post import Post
Upvotes: 1