mirror of
				https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
				synced 2025-11-04 00:16:12 +00:00 
			
		
		
		
	fixed test deprecations
This commit is contained in:
		
							
								
								
									
										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 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():
 | 
			
		||||
    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():
 | 
			
		||||
    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)})
 | 
			
		||||
    assert response.status_code == 200
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user