def test_should_contain_a_not_none_query(self): "Document.query should never be None" db = OmMongo() db.init_app(self.app) class Person(db.Document): name = db.StringField() p = Person() assert p.query is not None
def test_should_be_able_to_instantiate_without_passing_the_app_and_set_it_later( self): db = OmMongo() assert db.session is None db.init_app(self.app) assert db.session is not None