allow to use sets in field choices (#1482)
This commit is contained in:
22
tests/utils.py
Normal file
22
tests/utils.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import unittest
|
||||
|
||||
from mongoengine import connect
|
||||
from mongoengine.connection import get_db
|
||||
|
||||
MONGO_TEST_DB = 'mongoenginetest'
|
||||
|
||||
|
||||
class MongoDBTestCase(unittest.TestCase):
|
||||
"""Base class for tests that need a mongodb connection
|
||||
db is being dropped automatically
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls._connection = connect(db=MONGO_TEST_DB)
|
||||
cls._connection.drop_database(MONGO_TEST_DB)
|
||||
cls.db = get_db()
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
cls._connection.drop_database(MONGO_TEST_DB)
|
||||
Reference in New Issue
Block a user