def METHOD_NAME(self, client, dummy_file):
    test_string = "Upload file test case"
    test_bytes = bytearray(test_string, encoding='utf-8')
    def stream_upload(data, length, block_size):
        progress = 0
        while True:
            block = data.read(block_size)
            progress += len(block)
            print("Progress... {}%".format(int(progress*100/length)))
            if not block:
                break
            yield block
    result = io.BytesIO()
    with io.BytesIO(test_bytes) as stream_data:
        streamed_upload = stream_upload(stream_data, len(test_string), 2)
        resp = client.formdata.upload_file_via_body(streamed_upload)
        for r in resp:
            result.write(r)
        assert result.getvalue().decode() ==  test_string
    result = io.BytesIO()
    with open(dummy_file, 'rb') as upload_data:
        streamed_upload = stream_upload(upload_data, len("Test file"), 2)
        response = client.formdata.upload_file_via_body(streamed_upload)
        for data in response:
            result.write(data)
        assert result.getvalue().decode() == "Test file"