mirror of https://gitlab.com/bashrc2/epicyon
Fix unit tests
parent
e58e7ce059
commit
0b19087c88
2
city.py
2
city.py
|
@ -128,7 +128,7 @@ def _getCityPulse(currTimeOfDay, decoySeed: int) -> (float, float):
|
||||||
|
|
||||||
def spoofGeolocation(baseDir: str,
|
def spoofGeolocation(baseDir: str,
|
||||||
city: str, currTime, decoySeed: int,
|
city: str, currTime, decoySeed: int,
|
||||||
citiesList: []) -> (float, float, str, str, \
|
citiesList: []) -> (float, float, str, str,
|
||||||
str, str, int):
|
str, str, int):
|
||||||
"""Given a city and the current time spoofs the location
|
"""Given a city and the current time spoofs the location
|
||||||
for an image
|
for an image
|
||||||
|
|
|
@ -593,10 +593,14 @@ def personUpgradeActor(baseDir: str, personJson: {},
|
||||||
updateActor = True
|
updateActor = True
|
||||||
|
|
||||||
if not personJson.get('affiliation'):
|
if not personJson.get('affiliation'):
|
||||||
|
rolesStr = ''
|
||||||
|
adminName = getConfigParam(baseDir, 'admin')
|
||||||
|
if personJson['id'].endswith('/users/' + adminName):
|
||||||
|
rolesStr = 'admin'
|
||||||
statusNumber, published = getStatusNumber()
|
statusNumber, published = getStatusNumber()
|
||||||
personJson['affiliation'] = {
|
personJson['affiliation'] = {
|
||||||
"@type": "OrganizationRole",
|
"@type": "OrganizationRole",
|
||||||
"roleName": "",
|
"roleName": rolesStr,
|
||||||
"affiliation": {
|
"affiliation": {
|
||||||
"@type": "WebSite",
|
"@type": "WebSite",
|
||||||
"url": personJson['id'].split('/users/')[0]
|
"url": personJson['id'].split('/users/')[0]
|
||||||
|
|
7
roles.py
7
roles.py
|
@ -7,13 +7,6 @@ __email__ = "bob@freedombone.net"
|
||||||
__status__ = "Production"
|
__status__ = "Production"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from webfinger import webfingerHandle
|
|
||||||
from auth import createBasicAuthHeader
|
|
||||||
from posts import getPersonBox
|
|
||||||
from session import postJson
|
|
||||||
from utils import getFullDomain
|
|
||||||
from utils import getNicknameFromActor
|
|
||||||
from utils import getDomainFromActor
|
|
||||||
from utils import loadJson
|
from utils import loadJson
|
||||||
from utils import saveJson
|
from utils import saveJson
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue