def oembed(input): return replace(input)
def testManySameEmbeds(self): text = " ".join([self.middle % self.loc] * 2) resp = " ".join([self.middle % self.embed] * 2) self.assertEquals(replace(text), resp)
def render(self, context): kwargs = {} if self.width and self.height: kwargs['max_width'] = self.width kwargs['max_height'] = self.height return replace(self.nodelist.render(context), **kwargs)
def testEnd(self): for text in (self.end, self.start, self.middle, self.trailing_comma, self.trailing_period): self.assertEquals( replace(text % self.loc), text % self.embed )
def testNoEmbed(self): self.assertEquals( replace(self.noembed), self.noembed )