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