Change the mock database name to "db", because all of the codebase is using this database.
This change enables us to write unit tests without the need to patch the the database name in all of the mongo queries that look like "mongo.db.collection"
This commit is contained in:
parent
1ab0fe7b13
commit
3781095f25
|
@ -1,7 +1,10 @@
|
|||
import mongoengine
|
||||
import pytest
|
||||
|
||||
MOCK_DB_NAME = "mongoenginetest"
|
||||
# Database name has to match the db used in the codebase,
|
||||
# else the name needs to be mocked during tests.
|
||||
# Currently its used like so: "mongo.db.telemetry.find()".
|
||||
MOCK_DB_NAME = "db"
|
||||
|
||||
|
||||
@pytest.fixture(scope="module", autouse=True)
|
||||
|
|
Loading…
Reference in New Issue