Example #1
0
 def test_lease_update(self):
     o1 = api.offer_create(test_offer_2)
     test_lease_4['offer_uuid'] = o1.uuid
     l1 = api.lease_create(test_lease_4)
     values = {
         'start_time': test_lease_5['start_time'],
         'end_time': test_lease_5['end_time']
     }
     api.lease_update(l1.uuid, values)
     l1 = api.lease_get_by_uuid(l1.uuid)
     self.assertEqual(test_lease_5['start_time'], l1.start_time)
     self.assertEqual(test_lease_5['end_time'], l1.end_time)
Example #2
0
 def test_lease_destroy_not_found(self):
     self.assertEqual(api.lease_get_by_uuid('lease_4'), None)
Example #3
0
 def test_lease_destroy(self):
     o1 = api.offer_create(test_offer_2)
     test_lease_4['offer_uuid'] = o1.uuid
     l1 = api.lease_create(test_lease_4)
     api.lease_destroy(l1.uuid)
     self.assertEqual(api.lease_get_by_uuid('lease_4'), None)
Example #4
0
 def test_lease_get_by_uuid_not_found(self):
     assert api.lease_get_by_uuid('some_uuid') is None
Example #5
0
 def test_lease_get_by_uuid(self):
     o1 = api.offer_create(test_offer_2)
     test_lease_4['offer_uuid'] = o1.uuid
     l1 = api.lease_create(test_lease_4)
     res = api.lease_get_by_uuid(l1.uuid)
     self.assertEqual(l1.uuid, res.uuid)