misc: fix typo PETALE_AUTHENTIC_CREDS -> PETALE_AUTHENTIC_AUTH (#646950

This commit is contained in:
Benjamin Dauvergne 2022-04-29 11:13:14 +02:00
parent 3fe60f226c
commit aed59546fc
2 changed files with 3 additions and 3 deletions

View File

@ -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()

View File

@ -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