Check that json is available

main2
Bob Mottram 2019-11-09 09:52:09 +00:00
parent f796f3f93b
commit 6e4bd2092c
1 changed files with 5 additions and 3 deletions

View File

@ -424,9 +424,11 @@ 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 receivedJson
assert 'Why is a mouse when it spins?' in receivedJson['object']['content']
assert 'यह एक परीक्षण है' in receivedJson['object']['content']