From 6e4bd2092c08a9b4d8a2368afcbf3d853a6e5089 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 9 Nov 2019 09:52:09 +0000 Subject: [PATCH] Check that json is available --- tests.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests.py b/tests.py index d3aa6b73..df277a34 100644 --- a/tests.py +++ b/tests.py @@ -424,12 +424,14 @@ def testPostMessageBetweenServers(): for name in os.listdir(inboxPath): filename=os.path.join(inboxPath, name) assert os.path.isfile(filename) + receivedJson=None with open(filename, 'r') as fp: receivedJson=commentjson.load(fp) pprint(receivedJson['object']['content']) - assert 'Why is a mouse when it spins?' in receivedJson['object']['content'] - assert 'यह एक परीक्षण है' in receivedJson['object']['content'] - + assert receivedJson + assert 'Why is a mouse when it spins?' in receivedJson['object']['content'] + assert 'यह एक परीक्षण है' in receivedJson['object']['content'] + print('\n\n*******************************************************') print("Bob likes Alice's post")