def testRewriteUrlsNoMatch(self): text = "bla href='/j/x/xyz.shtml' 123" text = static.rewriteUrls(text, mockTemplates) self.assertEquals(text, "bla href='/j/x/xyz.shtml' 123")
def testRewriteUrlsTwoMatches(self): text = "bla href='/j/x/noparam.shtml' 123 href=\"test.shtml?lang=de&x=y\" 1" text = static.rewriteUrls(text, mockTemplates) self.assertEquals(text, \ "bla href='noparam.html' 123 href=\"test.de.html\" 1")
def testRewriteUrlsQuote(self): text = "bla href='http://www.panter.ch/j/x/noparam.shtml' 123" text = static.rewriteUrls(text, mockTemplates) self.assertEquals(text, "bla href='noparam.html' 123")