mirror of https://gitlab.com/bashrc2/epicyon
Test for creation of news actor
parent
ad71c09aee
commit
5c6a45956c
14
tests.py
14
tests.py
|
@ -547,6 +547,20 @@ def testPostMessageBetweenServers():
|
||||||
break
|
break
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
|
# check that a news account exists
|
||||||
|
newsActorDir = aliceDir + '/accounts/news@' + aliceDomain
|
||||||
|
print("newsActorDir: " + newsActorDir)
|
||||||
|
assert os.path.isdir(newsActorDir)
|
||||||
|
newsActorFile = newsActorDir + '.json'
|
||||||
|
assert os.path.isfile(newsActorFile)
|
||||||
|
newsActorJson = loadJson(newsActorFile)
|
||||||
|
assert newsActorJson
|
||||||
|
assert newsActorJson.get("id")
|
||||||
|
# check the id of the news actor
|
||||||
|
print('News actor Id: ' + newsActorJson["id"])
|
||||||
|
assert (newsActorJson["id"] ==
|
||||||
|
httpPrefix + '://' + aliceAddress + '/users/news')
|
||||||
|
|
||||||
# Image attachment created
|
# Image attachment created
|
||||||
assert len([name for name in os.listdir(mediaPath)
|
assert len([name for name in os.listdir(mediaPath)
|
||||||
if os.path.isfile(os.path.join(mediaPath, name))]) > 0
|
if os.path.isfile(os.path.join(mediaPath, name))]) > 0
|
||||||
|
|
Loading…
Reference in New Issue