def test_adjust_image_tags_generates_correct_links(self): html = ''.join( utils.get_text_payloads(self.nested_referenced_image_attachment)) self.assertNotIn('get_attachment?position=4', html) html = utils.adjust_image_tags(html, self.nested_referenced_image_attachment, 'foo') self.assertIn('get_attachment?position=4', html)
def test_get_text_payloads(self): self.assertEquals([], utils.get_text_payloads(None)) self.assertEquals(1, len(utils.get_text_payloads(self.msg_ascii)))