Exemplo n.º 1
0
 def inline_the_styles(self):
     self.body_html = premailer.transform(self.raw_body_html,
                                          base_url="http://" +
                                          settings.DOMAIN + "/")
Exemplo n.º 2
0
 def test_doctype_is_not_comments(self):
     html = """<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">"""
     transformed = transform(html, base_url="http://bar.com")
     self.assertEqual(html, transformed)
Exemplo n.º 3
0
 def inline_the_styles(self):
     self.body_html = premailer.transform(self.raw_body_html, base_url="http://" + settings.DOMAIN + "/")
Exemplo n.º 4
0
 def test_comments(self):
     html = """foo<!-- bar -->baz"""
     transformed = transform(html, base_url="http://bar.com")
     self.assertEqual('foobaz', transformed)
Exemplo n.º 5
0
 def test_no_linebreak_added_to_links(self):
     html = """foo<a href="huh.bmp">bar</a>baz"""
     transformed = transform(html, base_url="http://bar.com")
     self.assertEqual("""foo<a href="http://bar.com/huh.bmp">bar</a>baz""", transformed)
Exemplo n.º 6
0
 def test_doctype_is_not_comments(self):
     html = """<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">"""
     transformed = transform(html, base_url="http://bar.com")
     self.assertEqual(html, transformed)
Exemplo n.º 7
0
 def test_comments(self):
     html = """foo<!-- bar -->baz"""
     transformed = transform(html, base_url="http://bar.com")
     self.assertEqual("foobaz", transformed)
Exemplo n.º 8
0
 def test_no_linebreak_added_to_links(self):
     html = """foo<a href="huh.bmp">bar</a>baz"""
     transformed = transform(html, base_url="http://bar.com")
     self.assertEqual("""foo<a href="http://bar.com/huh.bmp">bar</a>baz""", transformed)