MCPcopy Index your code
hub / github.com/MagicStack/asyncpg / get_connection_spec

Method get_connection_spec

asyncpg/_testbase/__init__.py:347–357  ·  view source on GitHub ↗
(cls, kwargs={})

Source from the content-addressed store, hash-verified

345
346 @classmethod
347 def get_connection_spec(cls, kwargs={}):
348 conn_spec = cls.cluster.get_connection_spec()
349 if kwargs.get('dsn'):
350 conn_spec.pop('host')
351 conn_spec.update(kwargs)
352 if not os.environ.get('PGHOST') and not kwargs.get('dsn'):
353 if 'database' not in conn_spec:
354 conn_spec['database'] = 'postgres'
355 if 'user' not in conn_spec:
356 conn_spec['user'] = 'postgres'
357 return conn_spec
358
359 @classmethod
360 def connect(cls, **kwargs):

Callers 6

create_poolMethod · 0.95
connectMethod · 0.45
setUpClassMethod · 0.45
get_connection_specMethod · 0.45
setup_clusterMethod · 0.45

Calls 1

getMethod · 0.80

Tested by

no test coverage detected