-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e16bc5
commit b17321d
Showing
5 changed files
with
36 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.1.1' | ||
__version__ = '0.1.2' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
mongoengine==0.23.1 | ||
mongoengine==0.27.0 | ||
dnspython==2.1.0 | ||
blinker==1.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,19 @@ | ||
from mongoengine import connect | ||
from functools import partial | ||
|
||
DATABASE_URI = 'mongomock://localhost:27017/db' | ||
connect(host=DATABASE_URI) | ||
import mongomock | ||
import pytest | ||
from _pytest.monkeypatch import MonkeyPatch | ||
|
||
DATABASE_URI = 'mongodb://localhost:27017/db' | ||
|
||
|
||
@pytest.fixture(autouse=True) | ||
def connect_database(monkeypatch: MonkeyPatch): | ||
import mongoengine | ||
|
||
connect = partial( | ||
mongoengine.connect, mongo_client_class=mongomock.MongoClient | ||
) | ||
monkeypatch.setattr(mongoengine, 'connect', connect) | ||
|
||
connect(host=DATABASE_URI) |