async def METHOD_NAME(self, client):
    def test_callback(response, data, headers):
        return data
    test_string = "Upload file test case"
    test_bytes = bytearray(test_string, encoding='utf-8')
    result = io.BytesIO()
    with io.BytesIO(test_bytes) as stream_data:
        resp = await client.formdata.upload_file(stream_data, "UploadFile.txt", cls=test_callback)
        async for data in resp:
            result.write(data)
        assert result.getvalue().decode() ==  test_string