mirror of
https://git.collinwebdesigns.de/oscar.krause/fastapi-dls.git
synced 2025-08-26 14:37:01 +08:00
Merge branch 'v18.x-support' into 'main'
v18.x support / NLS 3.4.x compatibility See merge request oscar.krause/fastapi-dls!46
This commit is contained in:
commit
890777a2d0
17
app/main.py
17
app/main.py
@ -412,6 +412,23 @@ async def auth_v1_token(request: Request):
|
||||
return JSONr(response)
|
||||
|
||||
|
||||
# NLS 3.4.0 - venv/lib/python3.12/site-packages/nls_services_lease/test/test_lease_single_controller.py
|
||||
@app.post('/leasing/v1/config-token', description='request to get config token for lease operations')
|
||||
async def leasing_v1_config_token(request: Request):
|
||||
j, cur_time = json_loads((await request.body()).decode('utf-8')), datetime.now(UTC)
|
||||
|
||||
logging.debug('CALLED /leasing/v1/config-token')
|
||||
logging.debug(j)
|
||||
|
||||
response = {
|
||||
"service_instance_ref": INSTANCE_REF,
|
||||
}
|
||||
|
||||
logging.debug(response)
|
||||
|
||||
return JSONr(response)
|
||||
|
||||
|
||||
# venv/lib/python3.9/site-packages/nls_services_lease/test/test_lease_multi_controller.py
|
||||
@app.post('/leasing/v1/lessor', description='request multiple leases (borrow) for current origin')
|
||||
async def leasing_v1_lessor(request: Request):
|
||||
|
@ -166,6 +166,8 @@ def test_auth_v1_token():
|
||||
assert payload.get('origin_ref') == ORIGIN_REF
|
||||
|
||||
|
||||
# todo: /leasing/v1/config-token
|
||||
|
||||
def test_leasing_v1_lessor():
|
||||
payload = {
|
||||
'fulfillment_context': {
|
||||
|
Loading…
x
Reference in New Issue
Block a user