def METHOD_NAME(connector, datasource):
    responses.add(
        responses.POST,
        'https://auth.anaplan.com/token/authenticate',
        json={'tokenInfo': {'tokenValue': 'youpi'}},
        status=200,
    )
    responses.add(
        responses.GET,
        'https://api.anaplan.com/2/0/models/m1/views/m1v1/data?format=v1',
        status=200,
        match=[
            matchers.header_matcher(
                {'Accept': 'application/json', 'Authorization': 'AnaplanAuthToken youpi'}
            )
        ],
        body='notvalidjson',
    )
    with pytest.raises(AnaplanError):
        connector.get_df(datasource)