#NEWLINE# def test_get_reservations_for_resources( self ) : #NEWLINE# #INDENT# with mock . patch ( 'neutron.db.quota.api.utcnow' ) as mock_utcnow : #NEWLINE# #INDENT# self . _get_reservations_for_resource_helper ( ) #NEWLINE# mock_utcnow . return_value = datetime . datetime ( 2015 , 5 , 20 , 0 , 0 ) #NEWLINE# deltas = quota_api . get_reservations_for_resources ( self . context , self . tenant_id , [ 'goals' , 'assists' , 'bookings' ] ) #NEWLINE# self . assertIn ( 'goals' , deltas ) #NEWLINE# self . assertEqual ( 5 , deltas [ 'goals' ] ) #NEWLINE# self . assertIn ( 'assists' , deltas ) #NEWLINE# self . assertEqual ( 1 , deltas [ 'assists' ] ) #NEWLINE# self . assertIn ( 'bookings' , deltas ) #NEWLINE# self . assertEqual ( 1 , deltas [ 'bookings' ] ) #NEWLINE# self . assertEqual ( 3 , len ( deltas ) )