forked from indymedia/epicyon
Check that json is available
parent
f796f3f93b
commit
6e4bd2092c
6
tests.py
6
tests.py
|
@ -424,11 +424,13 @@ def testPostMessageBetweenServers():
|
||||||
for name in os.listdir(inboxPath):
|
for name in os.listdir(inboxPath):
|
||||||
filename=os.path.join(inboxPath, name)
|
filename=os.path.join(inboxPath, name)
|
||||||
assert os.path.isfile(filename)
|
assert os.path.isfile(filename)
|
||||||
|
receivedJson=None
|
||||||
with open(filename, 'r') as fp:
|
with open(filename, 'r') as fp:
|
||||||
receivedJson=commentjson.load(fp)
|
receivedJson=commentjson.load(fp)
|
||||||
pprint(receivedJson['object']['content'])
|
pprint(receivedJson['object']['content'])
|
||||||
assert 'Why is a mouse when it spins?' in receivedJson['object']['content']
|
assert receivedJson
|
||||||
assert 'यह एक परीक्षण है' in receivedJson['object']['content']
|
assert 'Why is a mouse when it spins?' in receivedJson['object']['content']
|
||||||
|
assert 'यह एक परीक्षण है' in receivedJson['object']['content']
|
||||||
|
|
||||||
print('\n\n*******************************************************')
|
print('\n\n*******************************************************')
|
||||||
print("Bob likes Alice's post")
|
print("Bob likes Alice's post")
|
||||||
|
|
Loading…
Reference in New Issue