From 5cb84e1fbdec888afb9651b36749a99393aca175 Mon Sep 17 00:00:00 2001 From: codl Date: Tue, 8 May 2018 00:07:15 +0200 Subject: [PATCH] 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 --- libforget/known_instances.py | 2 +- test/test_known_instances.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libforget/known_instances.py b/libforget/known_instances.py index 5f4f214..7b770c5 100644 --- a/libforget/known_instances.py +++ b/libforget/known_instances.py @@ -30,7 +30,7 @@ class KnownInstances(object): def __default(self): self.instances = [{ "instance": "mastodon.social", - "hits": 5 + "hits": 0 }] def clear(self): diff --git a/test/test_known_instances.py b/test/test_known_instances.py index 1b406c7..9b02402 100644 --- a/test/test_known_instances.py +++ b/test/test_known_instances.py @@ -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():