def test_api_reprocess(self, mock_url, mock_creds, mock_config, mock_post): """Test reprocess""" _api = BatchAppsApi(mock_creds, mock_config) mock_url.return_value = "https://test_endpoint.com/api/{jobid}" mock_post.return_value = {} val = _api.reprocess("test_id") mock_post.assert_called_with(mock_creds, "https://test_endpoint.com/api/test_id", self.headers) self.assertTrue(val.success) mock_post.side_effect = RestCallException(None, "Boom~", None) val = _api.reprocess("test_id") self.assertFalse(val.success)