From aaf0548bdffde8b048c2fc5b3634f74c05823e19 Mon Sep 17 00:00:00 2001 From: "Gavin M. Roy" Date: Tue, 7 Jul 2020 17:31:16 -0400 Subject: [PATCH] Fix indentation, duplicate test name --- sprockets_postgres.py | 4 ++-- tests.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sprockets_postgres.py b/sprockets_postgres.py index 5f11e2d..9cdf92e 100644 --- a/sprockets_postgres.py +++ b/sprockets_postgres.py @@ -351,8 +351,8 @@ class ApplicationMixin: if retry: await self._postgres_connected.wait() async with self.postgres_connector( - on_error, on_duration, timeout, - _attempt + 1) as connector: + on_error, on_duration, timeout, + _attempt + 1) as connector: yield connector return message = 'disconnected' diff --git a/tests.py b/tests.py index d6b3679..261c4e0 100644 --- a/tests.py +++ b/tests.py @@ -426,7 +426,7 @@ class RequestHandlerMixinTestCase(TestCase): aiopg.connection.Connection.cursor = original @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() with mock.patch.object(self.app, '_postgres_connect') as connect: connect.return_value = False