misc: fix typo PETALE_AUTHENTIC_CREDS -> PETALE_AUTHENTIC_AUTH (#646950
This commit is contained in:
parent
3fe60f226c
commit
aed59546fc
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue