Пример #1
0
def initdb():
    db.drop_all()
    db.create_all()

    admin = User(name=u'admin', email=u'*****@*****.**')
    db.session.add(admin)
    db.session.commit()
Пример #2
0
def initdb():
    db.drop_all()
    db.create_all()

    admin = User(name=u'admin', email=u'*****@*****.**')
    db.session.add(admin)
    db.session.commit()
Пример #3
0
    def setUp(self):
        """Reset all tables before testing."""

        db.create_all()
        self.init_data()