lower mastodon.social default hits in known instances to 0

if the user uses mastodon.social, it will be raised to 1, if not then it
can be replaced by the third instance the user logs into
This commit is contained in:
codl 2018-05-08 00:07:15 +02:00
parent 4c7a919079
commit 5cb84e1fbd
No known key found for this signature in database
GPG Key ID: 6CD7C8891ED1233A
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ class KnownInstances(object):
def __default(self):
self.instances = [{
"instance": "mastodon.social",
"hits": 5
"hits": 0
}]
def clear(self):

View File

@ -5,7 +5,7 @@ def test_known_instances_defaults():
ki = KnownInstances()
assert len(ki.instances) == 1
assert ki.instances[0]['instance'] == 'mastodon.social'
assert ki.instances[0]['hits'] > 0
assert isinstance(ki.instances[0]['hits'], int)
def test_known_instances_clear():