From 0ec25b3c99cecf85be5b135d12a60dcce564fda9 Mon Sep 17 00:00:00 2001 From: Mike Manger Date: Mon, 25 Nov 2024 13:45:31 +0000 Subject: [PATCH] Add seperate TESTING_SENDGRID_EU_API_KEY for testing EU sub accounts --- test/test_post_to_sendgrid.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/test_post_to_sendgrid.py b/test/test_post_to_sendgrid.py index fd4394e..64a37a7 100644 --- a/test/test_post_to_sendgrid.py +++ b/test/test_post_to_sendgrid.py @@ -36,9 +36,10 @@ def test_post(self): val = msg.send() self.assertEqual(val, 1) + # TESTING_SENDGRID_EU_API_KEY is only used for testing. @pytest.mark.skipif( - not os.environ.get("SENDGRID_API_KEY"), - reason="requires SENDGRID_API_KEY env var", + not os.environ.get("TESTING_SENDGRID_EU_API_KEY"), + reason="requires TESTING_SENDGRID_EU_API_KEY env var", ) def test_eu_post(self): """ @@ -46,7 +47,7 @@ def test_eu_post(self): in GitHub. """ - SENDGRID_API_KEY = os.environ.get("SENDGRID_API_KEY") + SENDGRID_API_KEY = os.environ.get("TESTING_SENDGRID_EU_API_KEY") # Set DEBUG=True so sandbox mode is enabled settings = {