From 32d1f062bc81416afcf67e95e11410846faf5b1d Mon Sep 17 00:00:00 2001
From: Your Name
Date: Sat, 8 Jul 2023 17:28:05 -0400
Subject: [PATCH] add some test
---
social/tests.py | 12 ++++++++++++
users/templates/users/account.html | 2 +-
users/templates/users/relationship_list.html | 2 +-
users/tests.py | 18 +++++++++++++++---
4 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/social/tests.py b/social/tests.py
index a7a66e52..3eb50a98 100644
--- a/social/tests.py
+++ b/social/tests.py
@@ -52,3 +52,15 @@ class SocialTest(TestCase):
self.assertEqual(len(timeline), 3)
timeline2 = self.bob.activity_manager.get_timeline()
self.assertEqual(len(timeline2), 2)
+
+ # remote unfollow
+ self.bob.mastodon_following = []
+ self.alice.mastodon_follower = []
+ self.bob.merge_relationships()
+ timeline = self.bob.activity_manager.get_timeline()
+ self.assertEqual(len(timeline), 0)
+
+ # local follow
+ self.bob.follow(self.alice)
+ timeline = self.bob.activity_manager.get_timeline()
+ self.assertEqual(len(timeline), 2)
diff --git a/users/templates/users/account.html b/users/templates/users/account.html
index 828cbc14..e94dacf4 100644
--- a/users/templates/users/account.html
+++ b/users/templates/users/account.html
@@ -124,7 +124,7 @@
{% if user.mastodon_last_refresh %}上次更新时间 {{ user.mastodon_last_refresh }}{% endif %}
- 为了正确高效的展示短评和评论,{{ site_name }}会缓存你在联邦宇宙的关注、屏蔽和静音列表。如果你刚刚更新过帐户的上锁状态、增减过关注、静音或屏蔽,希望立即生效,可以点击这里立刻更新;这类信息也会每天自动同步。
+ 为了正确高效的展示短评和评论,{{ site_name }}会缓存你在联邦宇宙的关注、屏蔽和隐藏列表。如果你刚刚更新过帐户的上锁状态、增减过关注、隐藏或屏蔽,希望立即生效,可以点击这里立刻更新;这类信息也会每天自动同步。
diff --git a/users/templates/users/relationship_list.html b/users/templates/users/relationship_list.html
index 5d567257..1907af75 100644
--- a/users/templates/users/relationship_list.html
+++ b/users/templates/users/relationship_list.html
@@ -15,7 +15,7 @@
- 此处只列出你在{{ site_name }}{{ name }},联邦宇宙{{ name }}列表可在你所属实例查询管理。
+ 此处仅列出并可导出你在{{ site_name }}的{{ name }},联邦宇宙{{ name }}列表可在你所属实例查询管理。