Exemple #1
0
def postgres_user(request):
    from fabtools.postgres import drop_user
    from fabtools.require.postgres import user
    name = 'pguser'
    user(name, password='******')
    request.addfinalizer(functools.partial(drop_user, name))
    return name
Exemple #2
0
def postgres_user():
    from fabtools.postgres import drop_user
    from fabtools.require.postgres import user
    name = 'pguser'
    user(name, password='******')
    yield name
    drop_user(name)
Exemple #3
0
def postgres_user():
    from fabtools.postgres import drop_user
    from fabtools.require.postgres import user
    name = 'pguser'
    user(name, password='******')
    yield name
    drop_user(name)
Exemple #4
0
def postgres_user(request):
    from fabtools.postgres import drop_user
    from fabtools.require.postgres import user
    name = 'pguser'
    user(name, password='******')
    request.addfinalizer(functools.partial(drop_user, name))
    return name
Exemple #5
0
def test_require_user(postgres_server):

    from fabtools.postgres import user_exists, drop_user
    from fabtools.require.postgres import user

    user('bob', password='******')

    assert user_exists('bob')

    drop_user('bob')
Exemple #6
0
def test_require_user(postgres_server):

    from fabtools.postgres import user_exists, drop_user
    from fabtools.require.postgres import user

    user('bob', password='******')

    assert user_exists('bob')

    drop_user('bob')
Exemple #7
0
def _setup_database():
    with settings(warn_only=True):
        postgres.server()
        postgres.user(env.psql_user, password=env.psql_password)
        postgres.database(env.psql_db, owner=env.psql_user)
Exemple #8
0
def _setup_database():
    with settings(warn_only=True):
        postgres.server()
        postgres.user(env.psql_user, password=env.psql_password)
        postgres.database(env.psql_db, owner=env.psql_user)