コード例 #1
0
ファイル: test_models.py プロジェクト: barto457/portfoliyo
 def test_replaces_newlines(self):
     """Replaces newlines with <br>."""
     assert models.text2html('foo\nbar') == 'foo<br>bar'
コード例 #2
0
 def test_replaces_newlines(self):
     """Replaces newlines with <br>."""
     assert models.text2html('foo\nbar') == 'foo<br>bar'
コード例 #3
0
ファイル: test_models.py プロジェクト: barto457/portfoliyo
 def test_escapes_html(self, monkeypatch):
     """Escapes any HTML in the original text."""
     assert models.text2html('<b>') == '&lt;b&gt;'
コード例 #4
0
 def test_escapes_html(self, monkeypatch):
     """Escapes any HTML in the original text."""
     assert models.text2html('<b>') == '&lt;b&gt;'