(cls, kwargs={})
| 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): |
no test coverage detected