mirror of https://github.com/Nonannet/pyladoc.git
coding style issues fixed
This commit is contained in:
parent
a65bb1c8e5
commit
ecc97bd9a6
|
@ -90,8 +90,6 @@ def test_html_render():
|
||||||
|
|
||||||
document_validation.validate_html(html_code, VALIDATE_HTML_CODE_ONLINE)
|
document_validation.validate_html(html_code, VALIDATE_HTML_CODE_ONLINE)
|
||||||
|
|
||||||
title = 'Test HTML Render 2'
|
|
||||||
|
|
||||||
if WRITE_RESULT_FILES:
|
if WRITE_RESULT_FILES:
|
||||||
with open('tests/out/test_html_render2.html', 'w', encoding='utf-8') as f:
|
with open('tests/out/test_html_render2.html', 'w', encoding='utf-8') as f:
|
||||||
f.write(pyladoc.inject_to_template({'CONTENT': html_code}, internal_template='templates/test_template.html'))
|
f.write(pyladoc.inject_to_template({'CONTENT': html_code}, internal_template='templates/test_template.html'))
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import pyladoc
|
import pyladoc
|
||||||
|
|
||||||
|
|
||||||
def test_inject_to_template():
|
def test_inject_to_template():
|
||||||
template = """
|
template = """
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
@ -15,14 +16,13 @@ def test_inject_to_template():
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
content = "Hello, World!"
|
content = "Hello, World!"
|
||||||
title = "Test Title"
|
title = "Test Title"
|
||||||
|
|
||||||
|
result = pyladoc.inject_to_template({'CONTENT': content, 'TITLE': title}, template_string=template)
|
||||||
result = pyladoc.inject_to_template({'CONTENT': content, 'TITLE': title},template_string=template)
|
|
||||||
|
|
||||||
print(result)
|
print(result)
|
||||||
|
|
||||||
assert "Hello, World!" in result
|
assert "Hello, World!" in result
|
||||||
assert "<title>Test Title</title>" in result
|
assert "<title>Test Title</title>" in result
|
||||||
|
|
Loading…
Reference in New Issue