Fix unit test

main
Bob Mottram 2025-06-03 14:22:36 +01:00
parent c7159d3843
commit 921f17c542
2 changed files with 8 additions and 8 deletions

View File

@ -1235,6 +1235,9 @@ def _get_simplified_content(content: str) -> str:
replacements = {
',': ' ',
';': ' ',
'"': ' ',
'': ' ',
'': ' ',
'- ': ' '
}
content_simplified = replace_strings(content, replacements)
@ -1382,9 +1385,7 @@ def add_html_tags(base_dir: str, http_prefix: str,
max_word_length = 40
replacements = {
'\r': '',
'\n': ' --linebreak-- ',
'': ' --openquote-- ',
'': ' --closequote-- '
'\n': ' --linebreak-- '
}
content = replace_strings(content, replacements)
now_playing_str = 'NowPlaying'

View File

@ -4176,11 +4176,10 @@ def _test_addemoji(base_dir: str):
'class="mention hashtag" rel="tag" tabindex="10">' + \
'<span aria-hidden="true">#</span>' + \
'<span>hashtag</span></a>".</p>'
# TODO
# if content_modified2 != expected_content2:
# print('expected_content2: ' + expected_content2)
# print('content_modified2: ' + content_modified2)
# assert content_modified2 == expected_content2
if content_modified2 != expected_content2:
print('expected_content2: ' + expected_content2)
print('content_modified2: ' + content_modified2)
assert content_modified2 == expected_content2
os.chdir(base_dir_original)
shutil.rmtree(base_dir_original + '/.tests',