From 3dc8030c3e5f6e3f99c2a0da5e8de8bc4ec1d213 Mon Sep 17 00:00:00 2001 From: "Gavin M. Roy" Date: Wed, 8 Jul 2020 14:44:10 -0400 Subject: [PATCH] Fix tests --- tests.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests.py b/tests.py index 261c4e0..a6bdcce 100644 --- a/tests.py +++ b/tests.py @@ -230,8 +230,10 @@ class TestCase(testing.SprocketsHttpTestCase): def setUp(self): super().setUp() - asyncio.get_event_loop().run_until_complete( - self.app._postgres_connected.wait()) + loop = asyncio.get_event_loop() + while self.app._postgres_connected is None: + loop.run_until_complete(asyncio.sleep(0.1)) + loop.run_until_complete(self.app._postgres_connected.wait()) @classmethod def setUpClass(cls):