File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 11__all__ = ("test_async_methods" ,)
22
33
4- async def test_async_methods () -> None :
4+ from pytest_databases .docker .postgres import PostgresService
5+
6+
7+ async def test_async_methods (postgres_service : PostgresService ) -> None :
58 # start-example
69 from sqlspec .adapters .asyncpg import AsyncpgConfig
710
11+ dsn = (
12+ f"postgresql://{ postgres_service .user } :{ postgres_service .password } "
13+ f"@{ postgres_service .host } :{ postgres_service .port } /{ postgres_service .database } "
14+ )
815 config = AsyncpgConfig (
9- pool_config = {"dsn" : "postgresql://user:pass@localhost/mydb" },
10- migration_config = {"enabled" : True , "script_location" : "migrations" },
16+ pool_config = {"dsn" : dsn }, migration_config = {"enabled" : True , "script_location" : "migrations" }
1117 )
1218
1319 # Apply migrations
You can’t perform that action at this time.
0 commit comments