示例#1
0
    def setUp(self):
        from deployer import settings
        app.config.from_object(settings)
        init_db()
        setup_db()

        # Setting up data to be tested
        self.project = Project(name='First Project',
                               git_repo='[email protected]:joepreludian/deployer-ci.git',
                               branch='master')
示例#2
0
from deployer.models import setup_db
from peewee import OperationalError

if __name__ == '__main__':
    print 'Initializing database...'
    try:
        setup_db()
    except OperationalError as e:
        print 'Error creating database: %s' % e