def test_404_error(self):
    self.pet_api.add_pet(body=self.pet)
    self.pet_api.delete_pet(pet_id=self.pet.id)
    with self.checkRaiseRegex(ApiException, 'Pet not found'):
        self.pet_api.get_pet_by_id(pet_id=self.pet.id)
    try:
        self.pet_api.get_pet_by_id(pet_id=self.pet.id)
    except ApiException as e:
        self.assertEqual(e.status, 404)
        self.assertEqual(e.reason, 'Not Found')
        self.checkRegex(e.body, 'Pet not found')
def test_404_error(self):
    self.pet_api.add_pet(body=self.pet)
    self.pet_api.delete_pet(pet_id=self.pet.id)
    with self.checkRaiseRegex(ApiException, 'Pet not found'):
        self.pet_api.get_pet_by_id(pet_id=self.pet.id)
    try:
        self.pet_api.get_pet_by_id(pet_id=self.pet.id)
    except ApiException as e:
        self.assertEqual(e.status, 404)
        self.assertEqual(e.reason, 'Not Found')
        self.checkRegex(e.body, 'Pet not found')