add standard hooks

This commit is contained in:
Bastien Gerard
2021-03-29 22:02:57 +02:00
parent e5a2714baf
commit b9d370c885
26 changed files with 39 additions and 34 deletions

View File

@@ -1,7 +1,7 @@
import pytest
from mongoengine import *
from tests.utils import get_as_pymongo, MongoDBTestCase
from tests.utils import MongoDBTestCase, get_as_pymongo
class TestBooleanField(MongoDBTestCase):

View File

@@ -4,10 +4,10 @@ from bson import InvalidDocument
from mongoengine import *
from mongoengine.base import BaseDict
from mongoengine.mongodb_support import (
get_mongodb_version,
MONGODB_36,
get_mongodb_version,
)
from tests.utils import get_as_pymongo, MongoDBTestCase
from tests.utils import MongoDBTestCase, get_as_pymongo
class TestDictField(MongoDBTestCase):

View File

@@ -4,7 +4,7 @@ import pytest
from bson import InvalidDocument
from mongoengine import Document, EnumField, ValidationError
from tests.utils import get_as_pymongo, MongoDBTestCase
from tests.utils import MongoDBTestCase, get_as_pymongo
class Status(Enum):

View File

@@ -2,7 +2,7 @@ import datetime
import unittest
import pytest
from bson import DBRef, ObjectId, SON
from bson import SON, DBRef, ObjectId
from mongoengine import (
BooleanField,
@@ -35,9 +35,9 @@ from mongoengine import (
ValidationError,
)
from mongoengine.base import (
_document_registry,
BaseField,
EmbeddedDocumentList,
_document_registry,
)
from mongoengine.errors import DeprecatedError
from tests.utils import MongoDBTestCase

View File

@@ -3,7 +3,7 @@ from bson.int64 import Int64
from mongoengine import *
from mongoengine.connection import get_db
from tests.utils import get_as_pymongo, MongoDBTestCase
from tests.utils import MongoDBTestCase, get_as_pymongo
class TestLongField(MongoDBTestCase):

View File

@@ -1,5 +1,5 @@
import pytest
from bson import DBRef, SON
from bson import SON, DBRef
from mongoengine import *
from tests.utils import MongoDBTestCase

View File

@@ -1,7 +1,7 @@
import pytest
from mongoengine import *
from tests.utils import get_as_pymongo, MongoDBTestCase
from tests.utils import MongoDBTestCase, get_as_pymongo
class TestStringField(MongoDBTestCase):

View File

@@ -3,7 +3,7 @@ import uuid
import pytest
from mongoengine import *
from tests.utils import get_as_pymongo, MongoDBTestCase
from tests.utils import MongoDBTestCase, get_as_pymongo
class Person(Document):