From 0e3a136c60891375127d754aca49fc3a2d276f04 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 18 Sep 2021 11:29:04 +0100 Subject: [PATCH] Check that group id is checked --- tests.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests.py b/tests.py index 1bf17707b..ef6467171 100644 --- a/tests.py +++ b/tests.py @@ -2362,6 +2362,20 @@ def testGroupFollow(baseDir: str) -> None: assert bobMessageArrived is True + # check that the received post has an id from the group, + # not from the original sender (alice) + groupIdChecked = False + for name in os.listdir(inboxPathBob): + filename = os.path.join(inboxPathBob, name) + if os.path.isfile(filename): + receivedJson = loadJson(filename) + assert receivedJson + print('Received group post ' + receivedJson['id']) + assert '/testgroup/statuses/' in receivedJson['id'] + groupIdChecked = True + break + assert groupIdChecked + # stop the servers thrAlice.kill() thrAlice.join()