def test_write_from_file():
    with files_server() as (server, directory):
        from_path = os.path.join(directory, "local_post")
        open(from_path, "wb").write(b"123456")

        to_path = os.path.join(directory, "remote_post")
        url = server.application_url + to_path % "?path=%s"
        RemoteTransferAction(to_path, url=url).write_from_path(from_path)

        posted_contents = open(to_path, "rb").read()
        assert posted_contents == b"123456", posted_contents
dataset/ETHPy150Open galaxyproject/pulsar/test/transfer_action_test.py/test_write_from_file/swapped operands of `%`