Beispiel #1
0
    def setUp(self):
        config = {'TESTING': True, 'WTF_CSRF_ENABLED': False}
        config['SECRET_KEY'] = 'secret-key-for-test'

        self.db_fd, self.db_file = tempfile.mkstemp()
        config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///%s' % self.db_file

        app = create_app(config)
        self.app = app

        self.client = app.test_client()

        db.create_all()

        if hasattr(self, 'prehook'):
            self.prehook()
Beispiel #2
0
    def setUp(self):
        config = {'TESTING': True, 'WTF_CSRF_ENABLED': False}
        config['SECRET_KEY'] = 'secret-key-for-test'

        self.db_fd, self.db_file = tempfile.mkstemp()
        config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///%s' % self.db_file

        app = create_app(config)
        self.app = app

        self.client = app.test_client()

        db.create_all()

        if hasattr(self, 'prehook'):
            self.prehook()
Beispiel #3
0
def createdb(config=CONFIG):
    """Create a database."""
    from june.models import db
    create_app(config)
    db.create_all()
Beispiel #4
0
def createdb():
    """Create database for june."""
    from june.models import db
    db.create_all()
Beispiel #5
0
def createdb():
    """Create a database."""
    from june.models import db
    db.create_all()