mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 05:59:44 -04:00
built new beautifulsoup function to apply
html tags to markdown file once processed with test cases.
This commit is contained in:
@@ -7,6 +7,7 @@ from freezegun import freeze_time
|
||||
|
||||
from app.formatters import (
|
||||
convert_markdown_template,
|
||||
apply_html_class,
|
||||
email_safe,
|
||||
format_datetime_relative,
|
||||
format_delta,
|
||||
@@ -181,3 +182,7 @@ def test_markdown_format(fake_markdown_file):
|
||||
app = Flask("app")
|
||||
with app.app_context():
|
||||
assert convert_markdown_template(fake_markdown_file, test=True) == "<h1>Test</h1>"
|
||||
|
||||
@pytest.mark.usefixtures("fake_soup_template")
|
||||
def test_soup_format(fake_soup_template):
|
||||
assert apply_html_class([['h1', 'testClass']], fake_soup_template) == '<h1 class="testClass">Test</h1>'
|
||||
|
||||
Reference in New Issue
Block a user