def METHOD_NAME(self):
    self.login_test1()
    d = self.create_doc(initial_par="[[[[[")
    args = ReplaceArguments(
        dryrun=False,
        format="",
        onlyfirst=False,
        regex=False,
        term=r"[[",
        to=r"x",
    )
    repls = [p.get_replacement() for p in perform_replace(d, args)]
    self.assertEqual([("[[", "x"), ("[[", "x")], repls)
    self.assertEqual("xx[\n", d.document.export_markdown(export_ids=False))