Fix tests

main
Bob Mottram 2023-04-30 11:12:52 +01:00
parent 579a9e88dd
commit 11995eccb4
2 changed files with 8 additions and 3 deletions

View File

@ -262,8 +262,10 @@ def _store_last_post_id(base_dir: str, nickname: str, domain: str,
post_id = remove_id_ending(post_json_object['id']) post_id = remove_id_ending(post_json_object['id'])
if not actor: if not actor:
return return
lastpost_dir = acct_dir(base_dir, nickname, domain) + '/lastpost' account_dir = acct_dir(base_dir, nickname, domain)
lastpost_dir = account_dir + '/lastpost'
if not os.path.isdir(lastpost_dir): if not os.path.isdir(lastpost_dir):
if os.path.isdir(account_dir):
os.mkdir(lastpost_dir) os.mkdir(lastpost_dir)
actor_filename = lastpost_dir + '/' + actor.replace('/', '#') actor_filename = lastpost_dir + '/' + actor.replace('/', '#')
try: try:

View File

@ -891,9 +891,12 @@ def _get_like_icon_html(nickname: str, domain_full: str,
'/users/' + nickname + '?likers=' + likers_post_id '/users/' + nickname + '?likers=' + likers_post_id
# show the number of likes next to icon # show the number of likes next to icon
show_liked_str = 'Show who liked this post'
if translate.get(show_liked_str):
show_liked_str = translate[show_liked_str]
like_str += '<label class="likesCount">' like_str += '<label class="likesCount">'
like_str += '<a href="' + likers_screen_link + '" ' + \ like_str += '<a href="' + likers_screen_link + '" ' + \
'title="' + translate['Show who liked this post'] + \ 'title="' + show_liked_str + \
'" tabindex="10">' '" tabindex="10">'
like_str += like_count_str.replace('(', '').replace(')', '').strip() like_str += like_count_str.replace('(', '').replace(')', '').strip()
like_str += '</a></label>\n' like_str += '</a></label>\n'