From fdd85c63a7f58bc6cf59c869bfc224e5fec28e0a Mon Sep 17 00:00:00 2001 From: Jake Rosenberg Date: Sat, 9 Dec 2023 10:55:50 -0600 Subject: [PATCH] make TEST setting optional --- designsafe/apps/data/apps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designsafe/apps/data/apps.py b/designsafe/apps/data/apps.py index 43949391d6..8ad2fdb9b5 100644 --- a/designsafe/apps/data/apps.py +++ b/designsafe/apps/data/apps.py @@ -20,7 +20,7 @@ class KeepAliveConnection(Urllib3HttpConnection): """ def __init__(self, *args, **kwargs): super(KeepAliveConnection, self).__init__(*args, **kwargs) - if not (settings.DEBUG or settings.TEST): + if not (settings.DEBUG or getattr(settings, "TEST", False)): self.pool.conn_kw['socket_options'] = HTTPConnection.default_socket_options + [ (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1), (socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, 60),