def test_get_postgres_url(self): url = get_postgres_url('mydb') assert url.endswith('@localhost:5432/mydb') assert get_postgres_url( 'mydb', user='******', password='******' ) == 'postgresql://*****:*****@localhost:5432/mydb' url = get_postgres_url('mydb', port=9999) assert url.endswith('@localhost:9999/mydb')
def dns(): return get_postgres_url("testdb")
def dns(): return get_postgres_url('testdb')