From aed59546fc2b98f168e69130bb8d4ad9d1eb8f30 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 29 Apr 2022 11:13:14 +0200 Subject: [PATCH] misc: fix typo PETALE_AUTHENTIC_CREDS -> PETALE_AUTHENTIC_AUTH (#646950 --- petale/api_views.py | 4 ++-- tests/test_commands.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/petale/api_views.py b/petale/api_views.py index ed9e589..516f43b 100644 --- a/petale/api_views.py +++ b/petale/api_views.py @@ -60,9 +60,9 @@ def check_unknown_cuts(uuids, creds=SENTINEL): if not authentic_url: raise ValueError('PETALE_AUTHENTIC SETTINGS improperly defined') - authentic_creds = creds if creds is not SENTINEL else getattr(settings, 'PETALE_AUTHENTIC_CREDS', None) + authentic_creds = creds if creds is not SENTINEL else getattr(settings, 'PETALE_AUTHENTIC_AUTH', None) if not authentic_creds: - raise ValueError('missing credentials for authentic, configure PETALE_AUTHENTIC_CREDS') + raise ValueError('missing credentials for authentic, configure PETALE_AUTHENTIC_AUTH') url = urlparse.urljoin(authentic_url, 'api/users/synchronization/') response = requests.post(url, json={"known_uuids": list(uuids)}, auth=authentic_creds, verify=False) response.raise_for_status() diff --git a/tests/test_commands.py b/tests/test_commands.py index 65f8c97..b82c613 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -11,7 +11,7 @@ from petale.models import CUT, Partner, Petal @pytest.fixture(autouse=True) def settings(settings): settings.PETALE_AUTHENTIC_URL = 'https://authentic.example.com/' - settings.PETALE_AUTHENTIC_CREDS = 'admin:admin' + settings.PETALE_AUTHENTIC_AUTH = 'admin:admin' @pytest.fixture