def METHOD_NAME(app, postgresql):
    """Create a test database which is destroyed afterwards.
    Used only internally, if you need to access the database use `db` instead to ensure
    your modifications are not persistent!
    """
    app.config['SQLALCHEMY_DATABASE_URI'] = postgresql
    configure_db(app)
    if 'INDICO_TEST_DATABASE_URI' in os.environ and os.environ.get('INDICO_TEST_DATABASE_HAS_TABLES') == '1':
        yield db_
        return
    with app.app_context():
        create_all_tables(db_)
    yield db_
    with app.app_context():
        db_.session.remove()
        delete_all_tables(db_)