mongomock Questions

2

I want to write tests for my FastAPI endpoints example for my code: from fastapi import FastAPI from fastapi.testclient import TestClient app = FastAPI() @app.get("/todos") async def ge...
Selfpreservation asked 26/4, 2022 at 7:2

1

Solved

I have code that connects to a MongoDB Client and I'm trying to test it. For testing, I don't want to connect to the actual client, so I'm trying to figure out make a fake one for testing purposes....
Sarcomatosis asked 23/8, 2018 at 14:36

0

During unittesting I'm calling: self.connection = connect(db="testdb", host="mongomock://localhost") self.connection.drop_database("testdb") between tests, however data is persisting. Is there a...
Swordplay asked 10/8, 2017 at 15:36
1

© 2022 - 2024 — McMap. All rights reserved.