forked from indymedia/epicyon
Test for unfollowing
parent
60b59d4f86
commit
983b299792
14
epicyon.py
14
epicyon.py
|
@ -93,20 +93,6 @@ session = createSession(domain,port,useTor)
|
||||||
personCache={}
|
personCache={}
|
||||||
cachedWebfingers={}
|
cachedWebfingers={}
|
||||||
|
|
||||||
clearFollows(baseDir,username,domain)
|
|
||||||
followPerson(baseDir,username,domain,'badger','wild.com',federationList)
|
|
||||||
followPerson(baseDir,username,domain,'squirrel','secret.com',federationList)
|
|
||||||
followPerson(baseDir,username,domain,'rodent','drainpipe.com',federationList)
|
|
||||||
followPerson(baseDir,username,domain,'batman','mesh.com',federationList)
|
|
||||||
followPerson(baseDir,username,domain,'giraffe','trees.com',federationList)
|
|
||||||
|
|
||||||
clearFollowers(baseDir,username,domain)
|
|
||||||
followerOfPerson(baseDir,username,domain,'badger','wild.com',federationList)
|
|
||||||
followerOfPerson(baseDir,username,domain,'squirrel','secret.com',federationList)
|
|
||||||
followerOfPerson(baseDir,username,domain,'rodent','drainpipe.com',federationList)
|
|
||||||
followerOfPerson(baseDir,username,domain,'batman','mesh.com',federationList)
|
|
||||||
followerOfPerson(baseDir,username,domain,'giraffe','trees.com',federationList)
|
|
||||||
|
|
||||||
#unfollowPerson(username,domain,'squirrel','secret.com')
|
#unfollowPerson(username,domain,'squirrel','secret.com')
|
||||||
#sys.exit()
|
#sys.exit()
|
||||||
|
|
||||||
|
|
13
tests.py
13
tests.py
|
@ -228,12 +228,25 @@ def testFollows():
|
||||||
followPerson(baseDir,username,domain,'giraffe','trees.com',federationList)
|
followPerson(baseDir,username,domain,'giraffe','trees.com',federationList)
|
||||||
|
|
||||||
f = open(baseDir+'/accounts/'+username+'@'+domain+'/following.txt', "r")
|
f = open(baseDir+'/accounts/'+username+'@'+domain+'/following.txt', "r")
|
||||||
|
domainFound=False
|
||||||
for followingDomain in f:
|
for followingDomain in f:
|
||||||
testDomain=followingDomain.split('@')[1].replace('\n','')
|
testDomain=followingDomain.split('@')[1].replace('\n','')
|
||||||
|
if testDomain=='mesh.com':
|
||||||
|
domainFound=True
|
||||||
if testDomain not in federationList:
|
if testDomain not in federationList:
|
||||||
print(testDomain)
|
print(testDomain)
|
||||||
assert(False)
|
assert(False)
|
||||||
|
|
||||||
|
assert(domainFound)
|
||||||
|
unfollowPerson(baseDir,username,domain,'batman','mesh.com')
|
||||||
|
|
||||||
|
domainFound=False
|
||||||
|
for followingDomain in f:
|
||||||
|
testDomain=followingDomain.split('@')[1].replace('\n','')
|
||||||
|
if testDomain=='mesh.com':
|
||||||
|
domainFound=True
|
||||||
|
assert(domainFound==False)
|
||||||
|
|
||||||
clearFollowers(baseDir,username,domain)
|
clearFollowers(baseDir,username,domain)
|
||||||
followerOfPerson(baseDir,username,domain,'badger','wild.com',federationList)
|
followerOfPerson(baseDir,username,domain,'badger','wild.com',federationList)
|
||||||
followerOfPerson(baseDir,username,domain,'squirrel','secret.com',federationList)
|
followerOfPerson(baseDir,username,domain,'squirrel','secret.com',federationList)
|
||||||
|
|
Loading…
Reference in New Issue