def test_500_error(self):
    self.pet_api.add_pet(body=self.pet)
    with self.checkRaiseRegex(ApiException, 'Internal Server Error'):
        self.pet_api.upload_file(pet_id=self.pet.id, additional_metadata='special', file=None)
    try:
        self.pet_api.upload_file(pet_id=self.pet.id, additional_metadata='special', file=None)
    except ApiException as e:
        self.assertEqual(e.status, 500)
        self.assertEqual(e.reason, 'Internal Server Error')
        self.checkRegex(e.body, 'Error 500 Internal Server Error')
def test_500_error(self):
    self.pet_api.add_pet(body=self.pet)
    with self.checkRaiseRegex(ApiException, 'Internal Server Error'):
        self.pet_api.upload_file(pet_id=self.pet.id, additional_metadata='special', file=None)
    try:
        self.pet_api.upload_file(pet_id=self.pet.id, additional_metadata='special', file=None)
    except ApiException as e:
        self.assertEqual(e.status, 500)
        self.assertEqual(e.reason, 'Internal Server Error')
        self.checkRegex(e.body, 'Error 500 Internal Server Error')