mirror of
https://git.collinwebdesigns.de/oscar.krause/fastapi-dls.git
synced 2025-04-06 17:48:53 +03:00
fixed test deprecations
This commit is contained in:
parent
fd46eecfb3
commit
e6a2de40c9
20
test/main.py
20
test/main.py
@ -187,8 +187,6 @@ def test_leasing_v1_lessor():
|
|||||||
assert len(lease_result_list[0]['lease']['ref']) == 36
|
assert len(lease_result_list[0]['lease']['ref']) == 36
|
||||||
assert str(UUID(lease_result_list[0]['lease']['ref'])) == lease_result_list[0]['lease']['ref']
|
assert str(UUID(lease_result_list[0]['lease']['ref'])) == lease_result_list[0]['lease']['ref']
|
||||||
|
|
||||||
return lease_result_list[0]['lease']['ref']
|
|
||||||
|
|
||||||
|
|
||||||
def test_leasing_v1_lessor_lease():
|
def test_leasing_v1_lessor_lease():
|
||||||
response = client.get('/leasing/v1/lessor/leases', headers={'authorization': __bearer_token(ORIGIN_REF)})
|
response = client.get('/leasing/v1/lessor/leases', headers={'authorization': __bearer_token(ORIGIN_REF)})
|
||||||
@ -231,7 +229,23 @@ def test_leasing_v1_lease_delete():
|
|||||||
|
|
||||||
|
|
||||||
def test_leasing_v1_lessor_lease_remove():
|
def test_leasing_v1_lessor_lease_remove():
|
||||||
lease_ref = test_leasing_v1_lessor()
|
# see "test_leasing_v1_lessor()"
|
||||||
|
payload = {
|
||||||
|
'fulfillment_context': {
|
||||||
|
'fulfillment_class_ref_list': []
|
||||||
|
},
|
||||||
|
'lease_proposal_list': [{
|
||||||
|
'license_type_qualifiers': {'count': 1},
|
||||||
|
'product': {'name': 'NVIDIA RTX Virtual Workstation'}
|
||||||
|
}],
|
||||||
|
'proposal_evaluation_mode': 'ALL_OF',
|
||||||
|
'scope_ref_list': [ALLOTMENT_REF]
|
||||||
|
}
|
||||||
|
|
||||||
|
response = client.post('/leasing/v1/lessor', json=payload, headers={'authorization': __bearer_token(ORIGIN_REF)})
|
||||||
|
lease_result_list = response.json().get('lease_result_list')
|
||||||
|
lease_ref = lease_result_list[0]['lease']['ref']
|
||||||
|
#
|
||||||
|
|
||||||
response = client.delete('/leasing/v1/lessor/leases', headers={'authorization': __bearer_token(ORIGIN_REF)})
|
response = client.delete('/leasing/v1/lessor/leases', headers={'authorization': __bearer_token(ORIGIN_REF)})
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
|
Loading…
Reference in New Issue
Block a user