<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _edit_main(self, request):
 """Adds the link to the new unit testing results on the repo's main wiki page. """

        self.prefix = "{}_Pull_Request_{}".format(request.repo.name, request.pull.number)
        if not self.testmode:
            page = site.pages[self.basepage]
            text = page.text()
        else:
            text = "This is a fake wiki page.\n\n<!--@CI:Placeholder-->"
            
        self.newpage = self.prefix
        link = "Pull Request #{}".format(request.pull.number)
        text = text.replace("<!--@CI:Placeholder-->",
                            "* [[{}|{}]]\n<!--@CI:Placeholder-->".format(self.newpage, link))
        if not self.testmode:
            result = page.save(text, summary="Added {} unit test link.".format(link), minor=True, bot=True)
            return result[u'result'] == u'Success'
        else:
            return text