Пример #1
0
 def _clean(self):
     #from mongoengine.connection import _get_db
     #db = _get_db()
     #db.drop_collection("example")
     clear_document_registry()
     connect(db='mongoenginetest')
     self.db = _get_db()
     self.db.drop_collection("example")
Пример #2
0
 def _clean(self):
     #from mongoengine.connection import _get_db
     #db = _get_db()
     #db.drop_collection("example")
     clear_document_registry()
     connect(db='mongoenginetest')
     self.db = _get_db()
     self.db.drop_collection("example")
Пример #3
0
    def setUp(self):
        clear_document_registry()
        connect(db='mongoenginetest')
        self.db = _get_db()

        class Person(Document):
            name = StringField()
            age = IntField()
        self.Person = Person
Пример #4
0
    def setUp(self):
        clear_document_registry()
        connect(db='mongoenginetest')
        self.db = _get_db()

        class Person(Document):
            name = StringField()
            age = IntField()

        self.Person = Person
Пример #5
0
 def setUp(self):
     clear_document_registry()
     connect(db='mongoenginetest')
     self.db = _get_db()
Пример #6
0
 def setUp(self):
     clear_document_registry()
     connect(db='mongoenginetest')
     self.db = _get_db()
Пример #7
0
 def tearDown(self):
     self.Person.drop_collection()
     clear_document_registry()
Пример #8
0
 def tearDown(self):
     self.Person.drop_collection()
     clear_document_registry()