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