mirror of
https://github.com/sprockets/sprockets-postgres.git
synced 2024-12-28 11:24:11 +00:00
Fix indentation, duplicate test name
This commit is contained in:
parent
a1736bccae
commit
aaf0548bdf
2 changed files with 3 additions and 3 deletions
|
@ -351,8 +351,8 @@ class ApplicationMixin:
|
||||||
if retry:
|
if retry:
|
||||||
await self._postgres_connected.wait()
|
await self._postgres_connected.wait()
|
||||||
async with self.postgres_connector(
|
async with self.postgres_connector(
|
||||||
on_error, on_duration, timeout,
|
on_error, on_duration, timeout,
|
||||||
_attempt + 1) as connector:
|
_attempt + 1) as connector:
|
||||||
yield connector
|
yield connector
|
||||||
return
|
return
|
||||||
message = 'disconnected'
|
message = 'disconnected'
|
||||||
|
|
2
tests.py
2
tests.py
|
@ -426,7 +426,7 @@ class RequestHandlerMixinTestCase(TestCase):
|
||||||
aiopg.connection.Connection.cursor = original
|
aiopg.connection.Connection.cursor = original
|
||||||
|
|
||||||
@mock.patch('aiopg.connection.Connection.cursor')
|
@mock.patch('aiopg.connection.Connection.cursor')
|
||||||
def test_postgres_cursor_raises(self, cursor):
|
def test_postgres_cursor_raises_on_failed_reconnect(self, cursor):
|
||||||
cursor.side_effect = psycopg2.OperationalError()
|
cursor.side_effect = psycopg2.OperationalError()
|
||||||
with mock.patch.object(self.app, '_postgres_connect') as connect:
|
with mock.patch.object(self.app, '_postgres_connect') as connect:
|
||||||
connect.return_value = False
|
connect.return_value = False
|
||||||
|
|
Loading…
Reference in a new issue