'Ensure that chunk_size is passed as None or an integer, otherwise
raise a TypeError.'

def test_response_chunk_size_type(self):

    r = requests.Response()
    r.raw = io.BytesIO('the    content')
    chunks = r.iter_content(1)
    assert all(((len(chunk) == 1) for chunk in chunks))
    r = requests.Response()
    r.raw = io.BytesIO('the    content')
    chunks = r.iter_content(None)
    assert (list(chunks) == ['the    content'])
    r = requests.Response()
    r.raw = io.BytesIO('the    content')
    with pytest.raises(TypeError):
        chunks = r.iter_content('1024')
