@patch('requests.post')
def test_method_dispatching_post_request(fake_post):
    client = soundcloud.Client(client_id='foo')
    expected_url = client._resolve_resource_name('tracks')
    data = {
        'client_id': 'foo'
    }
    headers = {
        'User-Agent': soundcloud.USER_AGENT
    }
    (fake_post.expects_call()
              .with_args(expected_url,
                         data=data,
                         headers=headers,
                         allow_redirects=True)
              .returns(MockResponse("{}")))
    client.post('tracks')
Switch the templates for Ajax requests.
dataset/ETHPy150Open soundcloud/soundcloud-python/soundcloud/tests/test_client.py/test_method_dispatching_post_request--crossover with--dataset/ETHPy150Open shtalinberg/django-el-pagination/el_pagination/views.py/AjaxMultipleObjectTemplateResponseMixin.get_template_names