Exemplo n.º 1
0
	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")
Exemplo n.º 2
0
	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")
Exemplo n.º 3
0
	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")