I’m developing an API with Python and FastAPI to extract information from text and store it in a Neo4j database for analysis. I’m also implementing Test-Driven Development (TDD) in my development process.
Currently, I’m using a test database running in a Docker container. For testing endpoints that return information from the database, I manually populate the database using the Python Neo4j driver for each test. Is there a better approach for this? I’ve looked into in-memory implementations of Neo4j, but they seem to be deprecated. Additionally, I’m specifically working with Python. Any suggestions on how to improve my testing process?