mirror of https://gitlab.com/bashrc2/epicyon
Snake case
parent
e001a54f64
commit
4e2137c443
|
@ -38,7 +38,7 @@ from follow import deny_follow_request_via_server
|
||||||
from follow import get_follow_requests_via_server
|
from follow import get_follow_requests_via_server
|
||||||
from follow import get_following_via_server
|
from follow import get_following_via_server
|
||||||
from follow import get_followers_via_server
|
from follow import get_followers_via_server
|
||||||
from follow import send_follow_requestViaServer
|
from follow import send_follow_request_via_server
|
||||||
from follow import send_unfollow_request_via_server
|
from follow import send_unfollow_request_via_server
|
||||||
from posts import send_block_via_server
|
from posts import send_block_via_server
|
||||||
from posts import send_undo_block_via_server
|
from posts import send_undo_block_via_server
|
||||||
|
@ -2265,18 +2265,18 @@ def run_desktop_client(base_dir: str, proxy_type: str, http_prefix: str,
|
||||||
_say_command(say_str, say_str,
|
_say_command(say_str, say_str,
|
||||||
screenreader, system_language, espeak)
|
screenreader, system_language, espeak)
|
||||||
session_follow = create_session(proxy_type)
|
session_follow = create_session(proxy_type)
|
||||||
send_follow_requestViaServer(base_dir,
|
send_follow_request_via_server(base_dir,
|
||||||
session_follow,
|
session_follow,
|
||||||
nickname, password,
|
nickname, password,
|
||||||
domain, port,
|
domain, port,
|
||||||
follow_nickname,
|
follow_nickname,
|
||||||
follow_domain,
|
follow_domain,
|
||||||
follow_port,
|
follow_port,
|
||||||
http_prefix,
|
http_prefix,
|
||||||
cached_webfingers,
|
cached_webfingers,
|
||||||
person_cache,
|
person_cache,
|
||||||
debug, __version__,
|
debug, __version__,
|
||||||
signing_priv_key_pem)
|
signing_priv_key_pem)
|
||||||
else:
|
else:
|
||||||
if follow_handle:
|
if follow_handle:
|
||||||
say_str = follow_handle + ' is not valid'
|
say_str = follow_handle + ' is not valid'
|
||||||
|
|
16
epicyon.py
16
epicyon.py
|
@ -56,7 +56,7 @@ from follow import get_following_via_server
|
||||||
from follow import get_followers_via_server
|
from follow import get_followers_via_server
|
||||||
from follow import clear_follows
|
from follow import clear_follows
|
||||||
from follow import add_follower_of_person
|
from follow import add_follower_of_person
|
||||||
from follow import send_follow_requestViaServer
|
from follow import send_follow_request_via_server
|
||||||
from follow import send_unfollow_request_via_server
|
from follow import send_unfollow_request_via_server
|
||||||
from tests import test_shared_items_federation
|
from tests import test_shared_items_federation
|
||||||
from tests import test_group_follow
|
from tests import test_group_follow
|
||||||
|
@ -2067,13 +2067,13 @@ if args.follow:
|
||||||
if args.secure_mode:
|
if args.secure_mode:
|
||||||
signing_priv_key_pem = get_instance_actor_key(base_dir, domain)
|
signing_priv_key_pem = get_instance_actor_key(base_dir, domain)
|
||||||
|
|
||||||
send_follow_requestViaServer(base_dir, session,
|
send_follow_request_via_server(base_dir, session,
|
||||||
args.nickname, args.password,
|
args.nickname, args.password,
|
||||||
domain, port,
|
domain, port,
|
||||||
follow_nickname, follow_domain, follow_port,
|
follow_nickname, follow_domain, follow_port,
|
||||||
follow_http_prefix,
|
follow_http_prefix,
|
||||||
cached_webfingers, person_cache,
|
cached_webfingers, person_cache,
|
||||||
debug, __version__, signing_priv_key_pem)
|
debug, __version__, signing_priv_key_pem)
|
||||||
for t in range(20):
|
for t in range(20):
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
# TODO some method to know if it worked
|
# TODO some method to know if it worked
|
||||||
|
|
20
follow.py
20
follow.py
|
@ -947,19 +947,19 @@ def send_follow_request(session, base_dir: str,
|
||||||
return new_follow_json
|
return new_follow_json
|
||||||
|
|
||||||
|
|
||||||
def send_follow_requestViaServer(base_dir: str, session,
|
def send_follow_request_via_server(base_dir: str, session,
|
||||||
from_nickname: str, password: str,
|
from_nickname: str, password: str,
|
||||||
from_domain: str, from_port: int,
|
from_domain: str, from_port: int,
|
||||||
follow_nickname: str, follow_domain: str,
|
follow_nickname: str, follow_domain: str,
|
||||||
followPort: int,
|
followPort: int,
|
||||||
http_prefix: str,
|
http_prefix: str,
|
||||||
cached_webfingers: {}, person_cache: {},
|
cached_webfingers: {}, person_cache: {},
|
||||||
debug: bool, project_version: str,
|
debug: bool, project_version: str,
|
||||||
signing_priv_key_pem: str) -> {}:
|
signing_priv_key_pem: str) -> {}:
|
||||||
"""Creates a follow request via c2s
|
"""Creates a follow request via c2s
|
||||||
"""
|
"""
|
||||||
if not session:
|
if not session:
|
||||||
print('WARN: No session for send_follow_requestViaServer')
|
print('WARN: No session for send_follow_request_via_server')
|
||||||
return 6
|
return 6
|
||||||
|
|
||||||
from_domain_full = get_full_domain(from_domain, from_port)
|
from_domain_full = get_full_domain(from_domain, from_port)
|
||||||
|
|
30
tests.py
30
tests.py
|
@ -51,7 +51,7 @@ from posts import send_post_via_server
|
||||||
from posts import seconds_between_published
|
from posts import seconds_between_published
|
||||||
from follow import clear_follows
|
from follow import clear_follows
|
||||||
from follow import clear_followers
|
from follow import clear_followers
|
||||||
from follow import send_follow_requestViaServer
|
from follow import send_follow_request_via_server
|
||||||
from follow import send_unfollow_request_via_server
|
from follow import send_unfollow_request_via_server
|
||||||
from siteactive import site_is_active
|
from siteactive import site_is_active
|
||||||
from utils import convert_published_to_local_timezone
|
from utils import convert_published_to_local_timezone
|
||||||
|
@ -3094,13 +3094,13 @@ def test_client_to_server(base_dir: str):
|
||||||
|
|
||||||
print('\n\nAlice follows Bob')
|
print('\n\nAlice follows Bob')
|
||||||
signing_priv_key_pem = None
|
signing_priv_key_pem = None
|
||||||
send_follow_requestViaServer(alice_dir, session_alice,
|
send_follow_request_via_server(alice_dir, session_alice,
|
||||||
'alice', password,
|
'alice', password,
|
||||||
alice_domain, alice_port,
|
alice_domain, alice_port,
|
||||||
'bob', bob_domain, bob_port,
|
'bob', bob_domain, bob_port,
|
||||||
http_prefix,
|
http_prefix,
|
||||||
cached_webfingers, person_cache,
|
cached_webfingers, person_cache,
|
||||||
True, __version__, signing_priv_key_pem)
|
True, __version__, signing_priv_key_pem)
|
||||||
alice_petnames_filename = alice_dir + '/accounts/' + \
|
alice_petnames_filename = alice_dir + '/accounts/' + \
|
||||||
'alice@' + alice_domain + '/petnames.txt'
|
'alice@' + alice_domain + '/petnames.txt'
|
||||||
alice_following_filename = \
|
alice_following_filename = \
|
||||||
|
@ -3136,13 +3136,13 @@ def test_client_to_server(base_dir: str):
|
||||||
alice_domain, alice_port)
|
alice_domain, alice_port)
|
||||||
|
|
||||||
print('\n\nEVENT: Bob follows Alice')
|
print('\n\nEVENT: Bob follows Alice')
|
||||||
send_follow_requestViaServer(alice_dir, session_alice,
|
send_follow_request_via_server(alice_dir, session_alice,
|
||||||
'bob', 'bobpass',
|
'bob', 'bobpass',
|
||||||
bob_domain, bob_port,
|
bob_domain, bob_port,
|
||||||
'alice', alice_domain, alice_port,
|
'alice', alice_domain, alice_port,
|
||||||
http_prefix,
|
http_prefix,
|
||||||
cached_webfingers, person_cache,
|
cached_webfingers, person_cache,
|
||||||
True, __version__, signing_priv_key_pem)
|
True, __version__, signing_priv_key_pem)
|
||||||
for _ in range(10):
|
for _ in range(10):
|
||||||
if os.path.isfile(alice_dir + '/accounts/alice@' + alice_domain +
|
if os.path.isfile(alice_dir + '/accounts/alice@' + alice_domain +
|
||||||
'/followers.txt'):
|
'/followers.txt'):
|
||||||
|
|
Loading…
Reference in New Issue