'Verify that an exception is logged when data can\'t be retrieved.'

@mock.patch((UTILITY_MODULE + '.log.exception'))
def test_data_retrieval_failure_with_id(self, mock_exception):

    catalog_integration = self.create_catalog_integration()
    api = create_catalog_api_client(self.user)
    self._mock_catalog_api([httpretty.Response(body='clunk', content_type='application/json', status_code=500)])
    actual = get_edx_api_data(catalog_integration, 'programs', api=api, resource_id=100, many=False)
    self.assertTrue(mock_exception.called)
    self.assertEqual(actual, {})
