diff --git a/epicyon.py b/epicyon.py index f18f8319..67b844a7 100644 --- a/epicyon.py +++ b/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() diff --git a/tests.py b/tests.py index dce07ad2..925b8de9 100644 --- a/tests.py +++ b/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)