From 909c3dfb91970d6e300b88927cea9a1e5a43a1a2 Mon Sep 17 00:00:00 2001
From: Tanner Prestegard <tanner.prestegard@ligo.org>
Date: Tue, 25 Sep 2018 10:39:26 -0500
Subject: [PATCH] Allow blank client version header for unit tests

---
 gracedb/api/tests/utils.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gracedb/api/tests/utils.py b/gracedb/api/tests/utils.py
index 231aa4d9e..f5bc297e3 100644
--- a/gracedb/api/tests/utils.py
+++ b/gracedb/api/tests/utils.py
@@ -1,7 +1,14 @@
+from django.test import override_settings
+
 from rest_framework.test import APIClient
 
 from core.tests.utils import GraceDbTestBase
 
-
+# Need to allow requests without a client version header
+# to access the API for tests, unless we want to set and
+# update that header ourselves...
+@override_settings(
+    ALLOW_BLANK_USER_AGENT_TO_API=True,
+)
 class GraceDbApiTestBase(GraceDbTestBase):
     client_class = APIClient
-- 
GitLab