Check that calendar items get created

merge-requests/22/merge
Bob Mottram 2022-02-24 14:59:10 +00:00
parent c41069cf90
commit 3aac49eb64
2 changed files with 19 additions and 1 deletions

View File

@ -1391,7 +1391,7 @@ if args.message:
if args.secure_mode:
signing_priv_key_pem = get_instance_actor_key(base_dir, domain)
languages_understood = [args.language]
print('Sending post to ' + args.sendto)
send_post_via_server(signing_priv_key_pem, __version__,
base_dir, session, args.nickname, args.password,

View File

@ -2946,6 +2946,13 @@ def test_client_to_server(base_dir: str):
time.sleep(1)
# set bob to be following the calendar of alice
print('Bob follows the calendar of Alice')
following_cal_path = \
bob_dir + '/accounts/bob@' + bob_domain + '/followingCalendar.txt'
with open(following_cal_path, 'w+') as fp:
fp.write('alice@' + alice_domain + '\n')
print('\n\n*******************************************************')
print('EVENT: Alice sends to Bob via c2s')
@ -3035,6 +3042,17 @@ def test_client_to_server(base_dir: str):
if os.path.isfile(os.path.join(bob_outbox_path, name))]) == 0
print(">>> s2s post arrived in Bob's inbox")
calendar_path = bob_dir + '/accounts/bob@' + bob_domain + '/calendar'
if not os.path.isdir(calendar_path):
print('Missing calendar path: ' + calendar_path)
assert os.path.isdir(calendar_path)
assert os.path.isdir(calendar_path + '/' + str(test_date.year))
assert os.path.isfile(calendar_path + '/' + str(test_date.year) + '/' +
str(test_date.month) + '.txt')
print(">>> calendar entry created for s2s post which arrived at " +
"Bob's inbox")
print("c2s send success\n\n\n")
print('\n\nEVENT: Getting message id for the post')