feat: add tests command
This commit is contained in:
@@ -270,6 +270,30 @@ class Settings(BaseSettings):
|
||||
data['ITPAY_PUBLIC_ID'] = str(public_id).strip()
|
||||
data['ITPAY_API_SECRET'] = str(api_secret).strip()
|
||||
|
||||
ck_public = data.get('CLOUD_KASSIR_PUBLIC_ID') or os.getenv('CLOUD_KASSIR_PUBLIC_ID')
|
||||
ck_secret = data.get('CLOUD_KASSIR_API_SECRET') or os.getenv('CLOUD_KASSIR_API_SECRET')
|
||||
if ck_public is not None and str(ck_public).strip() and ck_secret is not None and str(ck_secret).strip():
|
||||
data['CLOUD_KASSIR_PUBLIC_ID'] = str(ck_public).strip()
|
||||
data['CLOUD_KASSIR_API_SECRET'] = str(ck_secret).strip()
|
||||
else:
|
||||
cloudkassir = read_secret_optional('cloudkassir')
|
||||
if cloudkassir:
|
||||
ck_ci = {str(k).lower(): v for k, v in cloudkassir.items()}
|
||||
public_id_ck = ck_ci.get('public_id')
|
||||
api_secret_ck = ck_ci.get('api_secret')
|
||||
if api_secret_ck is None:
|
||||
api_secret_ck = ck_ci.get('secret')
|
||||
if public_id_ck is not None and str(public_id_ck).strip():
|
||||
data['CLOUD_KASSIR_PUBLIC_ID'] = str(public_id_ck).strip()
|
||||
if api_secret_ck is not None and str(api_secret_ck).strip():
|
||||
data['CLOUD_KASSIR_API_SECRET'] = str(api_secret_ck).strip()
|
||||
inn_ck = ck_ci.get('inn')
|
||||
if inn_ck is not None and str(inn_ck).strip():
|
||||
data['CLOUD_KASSIR_INN'] = str(inn_ck).strip()
|
||||
base_ck = ck_ci.get('api_base_url')
|
||||
if base_ck is not None and str(base_ck).strip():
|
||||
data['CLOUD_KASSIR_API_BASE_URL'] = str(base_ck).strip()
|
||||
|
||||
return data
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user