Ejemplo n.º 1
0
def test_production_config():
    os.environ['CONFIG'] = 'inspectors.settings.ProdConfig'
    app = create_app()
    assert app.config['ENV'] == 'prod'
    assert app.config['DEBUG'] is False
    assert app.config['DEBUG_TB_ENABLED'] is False
    assert app.config['ASSETS_DEBUG'] is False
def run():
    ''' This is a script run daily that will do the following:
    Find activate users with past inspections
    Send requests for feedback, either by e-mail or sms
    '''
    app = create_app()
    with app.app_context():
        send_requests()
def run():
    app = create_app()
    with app.app_context():
        fake = make_generator()
        users = fake.inspections_users(40)
        for u in users:
            db.session.add(u)
        db.session.commit()
def run():
    app = create_app()
    with app.app_context():
        data = get_data()
        load_rows(data)
def run():
    app = create_app()
    with app.app_context():
        fake = make_fake()
        load_rows(fake.socrata_rows(800))
Ejemplo n.º 6
0
def test_dev_config():
    os.environ['CONFIG'] = 'inspectors.settings.DevConfig'
    app = create_app()
    assert app.config['ENV'] == 'dev'
    assert app.config['DEBUG'] is True
    assert app.config['ASSETS_DEBUG'] is True