コード例 #1
0
 def setUp(self):
     db.create_all()
     populate(default_data=True)
     # reset login settings in case tests fail
     self.app.config['APP_LOGIN_ENABLED'] = True
     self.app.config['CAS_LOGIN_ENABLED'] = True
     self.app.config['LTI_LOGIN_ENABLED'] = True
コード例 #2
0
 def setUp(self):
     db.create_all()
     with suppress_stdout():
         populate(default_data=True)
     # reset login settings in case tests fail
     self.app.config['APP_LOGIN_ENABLED'] = True
     self.app.config['CAS_LOGIN_ENABLED'] = True
     self.app.config['LTI_LOGIN_ENABLED'] = True
コード例 #3
0
ファイル: database.py プロジェクト: vishnu-meera/ACJ
def _create_tables():
    db.create_all()

    # add database version table and add current head version
    alembic_cfg = Config("alembic.ini")
    alembic_cfg.attributes['configure_logger'] = False
    command.stamp(alembic_cfg, 'head')

    print('All tables created...')
コード例 #4
0
def create(default_data=True, sample_data=False):
    """Creates database tables from sqlalchemy models"""
    db.create_all()
    populate(default_data, sample_data)

    # add database version table and add current head version
    alembic_cfg = Config("alembic.ini")
    command.stamp(alembic_cfg, 'head')

    print ('All tables are created and data is loaded.')
コード例 #5
0
ファイル: test_compair.py プロジェクト: vishnu-meera/ACJ
 def setUp(self):
     db.create_all()
     with suppress_stdout():
         populate(default_data=True, sample_data=True)
     self.app.config['DEMO_INSTALLATION'] = True
コード例 #6
0
ファイル: test_compair.py プロジェクト: ubc/acj-versus
 def setUp(self):
     db.create_all()
     with suppress_stdout():
         populate(default_data=True, sample_data=True)
     self.app.config['DEMO_INSTALLATION'] = True