mirror of https://gitlab.com/bashrc2/epicyon
Snake case
parent
a994392cd0
commit
507e435a2d
734
blocking.py
734
blocking.py
File diff suppressed because it is too large
Load Diff
8
tests.py
8
tests.py
|
@ -172,7 +172,7 @@ from shares import merge_shared_item_tokens
|
|||
from shares import send_share_via_server
|
||||
from shares import get_shared_items_catalog_via_server
|
||||
from blocking import load_cw_lists
|
||||
from blocking import add_c_wfrom_lists
|
||||
from blocking import add_cw_from_lists
|
||||
|
||||
testServerGroupRunning = False
|
||||
testServerAliceRunning = False
|
||||
|
@ -5922,7 +5922,7 @@ def _test_add_cw_lists(base_dir: str) -> None:
|
|||
"content": ""
|
||||
}
|
||||
}
|
||||
add_c_wfrom_lists(post_json_object, cw_lists, translate, 'Murdoch press')
|
||||
add_cw_from_lists(post_json_object, cw_lists, translate, 'Murdoch press')
|
||||
assert post_json_object['object']['sensitive'] is False
|
||||
assert post_json_object['object']['summary'] is None
|
||||
|
||||
|
@ -5933,7 +5933,7 @@ def _test_add_cw_lists(base_dir: str) -> None:
|
|||
"content": "Blah blah news.co.uk blah blah"
|
||||
}
|
||||
}
|
||||
add_c_wfrom_lists(post_json_object, cw_lists, translate, 'Murdoch press')
|
||||
add_cw_from_lists(post_json_object, cw_lists, translate, 'Murdoch press')
|
||||
assert post_json_object['object']['sensitive'] is True
|
||||
assert post_json_object['object']['summary'] == "Murdoch Press"
|
||||
|
||||
|
@ -5944,7 +5944,7 @@ def _test_add_cw_lists(base_dir: str) -> None:
|
|||
"content": "Blah blah news.co.uk blah blah"
|
||||
}
|
||||
}
|
||||
add_c_wfrom_lists(post_json_object, cw_lists, translate, 'Murdoch press')
|
||||
add_cw_from_lists(post_json_object, cw_lists, translate, 'Murdoch press')
|
||||
assert post_json_object['object']['sensitive'] is True
|
||||
assert post_json_object['object']['summary'] == \
|
||||
"Murdoch Press / Existing CW"
|
||||
|
|
|
@ -81,7 +81,7 @@ from webfinger import webfinger_handle
|
|||
from speaker import update_speaker
|
||||
from languages import auto_translate_post
|
||||
from blocking import is_blocked
|
||||
from blocking import add_c_wfrom_lists
|
||||
from blocking import add_cw_from_lists
|
||||
from reaction import html_emoji_reactions
|
||||
|
||||
|
||||
|
@ -1825,7 +1825,7 @@ def individual_post_as_html(signing_priv_key_pem: str,
|
|||
footerStr = newFooterStr
|
||||
|
||||
# add any content warning from the cwlists directory
|
||||
add_c_wfrom_lists(post_json_object, cw_lists, translate, lists_enabled)
|
||||
add_cw_from_lists(post_json_object, cw_lists, translate, lists_enabled)
|
||||
|
||||
postIsSensitive = False
|
||||
if post_json_object['object'].get('sensitive'):
|
||||
|
|
Loading…
Reference in New Issue