def test_json_or_error_raises_500(self):
        response_mock = Mock()
        response_mock.url = 'http://broken.example.com'
        response_mock.status_code = 500
        response_mock.text = 'Oops!'

        with self.assertRaisesMessage(
                JsonApiError,
                'API request to http://broken.example.com failed with HTTP status 500: Oops!'):
            JsonApiRequest.json_or_error(response_mock)
Allocator hostname.
dataset/ETHPy150Open dimagi/commcare-hq/custom/dhis2/tests.py/JsonApiRequestTest.test_json_or_error_raises_500--crossover with--dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/resource.py/LocalAllocator.host