mirror of https://gitlab.com/bashrc2/epicyon
Test for unfollowing
parent
60b59d4f86
commit
983b299792
14
epicyon.py
14
epicyon.py
|
@ -93,20 +93,6 @@ session = createSession(domain,port,useTor)
|
|||
personCache={}
|
||||
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')
|
||||
#sys.exit()
|
||||
|
||||
|
|
13
tests.py
13
tests.py
|
@ -228,12 +228,25 @@ def testFollows():
|
|||
followPerson(baseDir,username,domain,'giraffe','trees.com',federationList)
|
||||
|
||||
f = open(baseDir+'/accounts/'+username+'@'+domain+'/following.txt', "r")
|
||||
domainFound=False
|
||||
for followingDomain in f:
|
||||
testDomain=followingDomain.split('@')[1].replace('\n','')
|
||||
if testDomain=='mesh.com':
|
||||
domainFound=True
|
||||
if testDomain not in federationList:
|
||||
print(testDomain)
|
||||
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)
|
||||
followerOfPerson(baseDir,username,domain,'badger','wild.com',federationList)
|
||||
followerOfPerson(baseDir,username,domain,'squirrel','secret.com',federationList)
|
||||
|
|
Loading…
Reference in New Issue