@mock.patch('requests.post', empty_response)
def test_absa_call(api, auth_header, mocker):
    mocker.spy(requests, 'post')
    api.analyze(['安全性能很好，很帅气。'], ['absa'])
    assert (requests.post.call_count == 1)
    requests.post.assert_called_once_with(urljoin(client.ANACODE_API_URL, 'analyze/'), headers=auth_header, json={'texts': ['安全性能很好，很帅气。'], 'analyses': ['absa']})
@mock.patch('requests.post', empty_response)
def test_absa_call(api, auth_header, mocker):
    mocker.spy(requests, 'post')
    api.analyze(['安全性能很好，很帅气。'], ['absa'])
    assert (requests.post.call_count == 1)
    requests.post.assert_called_once_with(urljoin(client.ANACODE_API_URL, 'analyze/'), headers=auth_header, json={'texts': ['安全性能很好，很帅气。'], 'analyses': ['absa']})