forked from indymedia/epicyon
Fix test
parent
5ed5aa0d33
commit
d8126b4ffa
|
@ -505,7 +505,7 @@ if args.message:
|
||||||
followersOnly=False
|
followersOnly=False
|
||||||
print('Sending post to '+args.sendto)
|
print('Sending post to '+args.sendto)
|
||||||
|
|
||||||
sendPostViaServer(session,args.nickname,args.password, \
|
sendPostViaServer(baseDir,session,args.nickname,args.password, \
|
||||||
domain,port, \
|
domain,port, \
|
||||||
toNickname,toDomain,toPort,ccUrl, \
|
toNickname,toDomain,toPort,ccUrl, \
|
||||||
httpPrefix,sendMessage,followersOnly, \
|
httpPrefix,sendMessage,followersOnly, \
|
||||||
|
|
4
posts.py
4
posts.py
|
@ -860,7 +860,7 @@ def sendPost(session,baseDir: str,nickname: str, domain: str, port: int, \
|
||||||
thr.start()
|
thr.start()
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def sendPostViaServer(session,fromNickname: str,password: str, \
|
def sendPostViaServer(baseDir,session,fromNickname: str,password: str, \
|
||||||
fromDomain: str, fromPort: int, \
|
fromDomain: str, fromPort: int, \
|
||||||
toNickname: str, toDomain: str, toPort: int, cc: str, \
|
toNickname: str, toDomain: str, toPort: int, cc: str, \
|
||||||
httpPrefix: str, content: str, followersOnly: bool, \
|
httpPrefix: str, content: str, followersOnly: bool, \
|
||||||
|
@ -923,7 +923,7 @@ def sendPostViaServer(session,fromNickname: str,password: str, \
|
||||||
toDomainFull=toDomain+':'+str(toPort)
|
toDomainFull=toDomain+':'+str(toPort)
|
||||||
toPersonId=httpPrefix+'://'+toDomainFull+'/users/'+toNickname
|
toPersonId=httpPrefix+'://'+toDomainFull+'/users/'+toNickname
|
||||||
postJsonObject = \
|
postJsonObject = \
|
||||||
createPostBase(None, \
|
createPostBase(baseDir, \
|
||||||
fromNickname,fromDomain,fromPort, \
|
fromNickname,fromDomain,fromPort, \
|
||||||
toPersonId,cc,httpPrefix,content, \
|
toPersonId,cc,httpPrefix,content, \
|
||||||
followersOnly,saveToFile,clientToServer, \
|
followersOnly,saveToFile,clientToServer, \
|
||||||
|
|
2
tests.py
2
tests.py
|
@ -1117,7 +1117,7 @@ def testClientToServer():
|
||||||
assert len([name for name in os.listdir(outboxPath) if os.path.isfile(os.path.join(outboxPath, name))])==0
|
assert len([name for name in os.listdir(outboxPath) if os.path.isfile(os.path.join(outboxPath, name))])==0
|
||||||
assert len([name for name in os.listdir(inboxPath) if os.path.isfile(os.path.join(inboxPath, name))])==0
|
assert len([name for name in os.listdir(inboxPath) if os.path.isfile(os.path.join(inboxPath, name))])==0
|
||||||
sendResult= \
|
sendResult= \
|
||||||
sendPostViaServer(sessionAlice,'alice',password, \
|
sendPostViaServer(aliceDir,sessionAlice,'alice',password, \
|
||||||
aliceDomain,alicePort, \
|
aliceDomain,alicePort, \
|
||||||
'bob',bobDomain,bobPort,None, \
|
'bob',bobDomain,bobPort,None, \
|
||||||
httpPrefix,'Sent from my ActivityPub client',followersOnly, \
|
httpPrefix,'Sent from my ActivityPub client',followersOnly, \
|
||||||
|
|
Loading…
Reference in New Issue