<s> from __future__ import print_function <EOL> from . helpers import create_file , get_source_path , HTTP_OK <EOL> def test_basic_md ( t ) : <EOL> content = '''<STR_LIT>''' <EOL> expected = '''<STR_LIT>''' <EOL> path = get_source_path ( '<STR_LIT>' ) <EOL> create_file ( path , content ) <EOL> resp = t . get ( '<STR_LIT>' ) <EOL> assert resp . status_code == HTTP_OK <EOL> assert resp . mimetype == '<STR_LIT>' <EOL> print ( resp . data ) <EOL> assert resp . data . strip ( ) == expected . strip ( ) <EOL> def test_jinja_variables ( t ) : <EOL> content = '<STR_LIT>' <EOL> expected = '<STR_LIT>' <EOL> path = get_source_path ( '<STR_LIT>' ) <EOL> create_file ( path , content ) <EOL> resp = t . get ( '<STR_LIT>' ) <EOL> assert resp . status_code == HTTP_OK <EOL> assert resp . mimetype == '<STR_LIT>' <EOL> print ( resp . data ) <EOL> assert resp . data . strip ( ) == expected . strip ( ) <EOL> def test_layout ( t ) : <EOL> base = '''<STR_LIT>''' <EOL> content = '''<STR_LIT>''' <EOL> expected = '''<STR_LIT>''' <EOL> create_file ( get_source_path ( '<STR_LIT>' ) , base ) <EOL> path = get_source_path ( '<STR_LIT>' ) <EOL> create_file ( path , content ) <EOL> resp = t . get ( '<STR_LIT>' ) <EOL> assert resp . status_code == HTTP_OK <EOL> assert resp . mimetype == '<STR_LIT>' <EOL> print ( resp . data ) <EOL> assert resp . data . strip ( ) == expected . strip ( ) <EOL> def test_fenced_code ( t ) : <EOL> content = '''<STR_LIT>''' <EOL> expected = '''<STR_LIT>''' <EOL> path = get_source_path ( '<STR_LIT>' ) <EOL> create_file ( path , content ) <EOL> resp = t . get ( '<STR_LIT>' ) <EOL> assert resp . status_code == HTTP_OK <EOL> assert resp . mimetype == '<STR_LIT>' <EOL> print ( resp . data ) <EOL> assert resp . data . strip ( ) == expected . strip ( ) <EOL> def test_protect_jinja_code ( t ) : <EOL> content = '''<STR_LIT>''' <EOL> expected = ( <EOL> '''<STR_LIT>''' <EOL> '''<STR_LIT>''' <EOL> '''<STR_LIT>''' <EOL> '''<STR_LIT>''' <EOL> ) <EOL> path = get_source_path ( '<STR_LIT>' ) <EOL> create_file ( path , content ) <EOL> resp = t . get ( '<STR_LIT>' ) <EOL> assert resp . status_code == HTTP_OK <EOL> assert resp . mimetype == '<STR_LIT>' <EOL> print ( resp . data ) <EOL> assert resp . data . strip ( ) == expected . strip ( ) <EOL> def test_admonition ( t ) : <EOL> content = '''<STR_LIT>''' <EOL> expected = '''<STR_LIT>''' <EOL> path = get_source_path ( '<STR_LIT>' ) <EOL> create_file ( path , content ) <EOL> resp = t . get ( '<STR_LIT>' ) <EOL> assert resp . status_code == HTTP_OK <EOL> assert resp . mimetype == '<STR_LIT>' <EOL> print ( resp . data ) <EOL> assert resp . data . strip ( ) == expected . strip ( ) <EOL> def test_superscript ( t ) : <EOL> content = '''<STR_LIT>''' <EOL> expected = '''<STR_LIT>''' <EOL> path = get_source_path ( '<STR_LIT>' ) <EOL> create_file ( path , content ) <EOL> resp = t . get ( '<STR_LIT>' ) <EOL> assert resp . status_code == HTTP_OK <EOL> assert resp . mimetype == '<STR_LIT>' <EOL> print ( resp . data ) <EOL> assert resp . data . strip ( ) == expected . strip ( ) <EOL> def test_delinsmark ( t ) : <EOL> content = ( <EOL> '''<STR_LIT>''' <EOL> '''<STR_LIT>''' <EOL> ) <EOL> expected = ( <EOL> '''<STR_LIT>''' <EOL> '''<STR_LIT>''' <EOL> ) <EOL> path = get_source_path ( '<STR_LIT>' ) <EOL> create_file ( path , content ) <EOL> resp = t . get ( '<STR_LIT>' ) <EOL> assert resp . status_code == HTTP_OK <EOL> assert resp . mimetype == '<STR_LIT>' <EOL> print ( resp . data ) <EOL> assert resp . data . strip ( ) == expected . strip ( ) <EOL> def test_autolink ( t ) : <EOL> content = '''<STR_LIT>''' <EOL> expected = '''<STR_LIT>''' <EOL> path = get_source_path ( '<STR_LIT>' ) <EOL> create_file ( path , content ) <EOL> resp = t . get ( '<STR_LIT>' ) <EOL> assert resp . status_code == HTTP_OK <EOL> assert resp . mimetype == '<STR_LIT>' <EOL> print ( resp . data ) <EOL> assert resp . data . strip ( ) == expected . strip ( ) </s>
