コード例 #1
0
ファイル: fixtures.py プロジェクト: tareqalam/guillotina
 async def __aenter__(self):
     dsn = "postgres://root:@localhost:26257/guillotina?sslmode=disable"
     self.storage = CockroachStorage(dsn=dsn,
                                     name='db',
                                     pool_size=25,
                                     conn_acquire_timeout=0.1)
     await self.storage.initialize(self.loop)
     return self.storage
コード例 #2
0
 async def __aenter__(self):
     dsn = "postgres://root:@{}:{}/guillotina?sslmode=disable".format(
         self.db[0], self.db[1])
     self.storage = CockroachStorage(dsn=dsn,
                                     name="db",
                                     pool_size=25,
                                     conn_acquire_timeout=0.1)
     await self.storage.initialize(self.loop)
     return self.storage