forked from indymedia/epicyon
Fix registrations within tests
parent
af32aa08d6
commit
03855a7341
13
person.py
13
person.py
|
@ -242,9 +242,11 @@ def createPerson(baseDir: str,nickname: str,domain: str,port: int, \
|
||||||
if not validNickname(nickname):
|
if not validNickname(nickname):
|
||||||
return None,None,None,None
|
return None,None,None,None
|
||||||
|
|
||||||
registrationsRemaining=int(getConfigParam(baseDir,'registrationsRemaining'))
|
remainingVal=getConfigParam(baseDir,'registrationsRemaining')
|
||||||
if registrationsRemaining<=0:
|
if remainingVal:
|
||||||
return None,None,None,None
|
registrationsRemaining=int(remainingVal)
|
||||||
|
if registrationsRemaining<=0:
|
||||||
|
return None,None,None,None
|
||||||
|
|
||||||
privateKeyPem,publicKeyPem,newPerson,webfingerEndpoint = \
|
privateKeyPem,publicKeyPem,newPerson,webfingerEndpoint = \
|
||||||
createPersonBase(baseDir,nickname,domain,port,httpPrefix,saveToFile,password)
|
createPersonBase(baseDir,nickname,domain,port,httpPrefix,saveToFile,password)
|
||||||
|
@ -263,8 +265,9 @@ def createPerson(baseDir: str,nickname: str,domain: str,port: int, \
|
||||||
copyfile(baseDir+'/img/image.png',baseDir+'/accounts/'+nickname+'@'+domain+'/image.png')
|
copyfile(baseDir+'/img/image.png',baseDir+'/accounts/'+nickname+'@'+domain+'/image.png')
|
||||||
if os.path.isfile(baseDir+'/img/banner.png'):
|
if os.path.isfile(baseDir+'/img/banner.png'):
|
||||||
copyfile(baseDir+'/img/banner.png',baseDir+'/accounts/'+nickname+'@'+domain+'/banner.png')
|
copyfile(baseDir+'/img/banner.png',baseDir+'/accounts/'+nickname+'@'+domain+'/banner.png')
|
||||||
registrationsRemaining-=1
|
if remainingVal:
|
||||||
setConfigParam(baseDir,'registrationsRemaining',str(registrationsRemaining))
|
registrationsRemaining-=1
|
||||||
|
setConfigParam(baseDir,'registrationsRemaining',str(registrationsRemaining))
|
||||||
return privateKeyPem,publicKeyPem,newPerson,webfingerEndpoint
|
return privateKeyPem,publicKeyPem,newPerson,webfingerEndpoint
|
||||||
|
|
||||||
def createSharedInbox(baseDir: str,nickname: str,domain: str,port: int, \
|
def createSharedInbox(baseDir: str,nickname: str,domain: str,port: int, \
|
||||||
|
|
Loading…
Reference in New Issue