diff --git a/src/feditest/nodedrivers/mastodon/__init__.py b/src/feditest/nodedrivers/mastodon/__init__.py index dc6df0b..e666701 100644 --- a/src/feditest/nodedrivers/mastodon/__init__.py +++ b/src/feditest/nodedrivers/mastodon/__init__.py @@ -264,8 +264,6 @@ def __init__(self, rolename: str, config: NodeConfiguration, account_manager: Ac # The request.Session with the custom certificate authority set as verifier. # Allocated when needed, so our custom certificate authority has been created before this is used. - self._auto_accept_follow = auto_accept_follow # True is default for Mastodon - # From FediverseNode @@ -333,8 +331,9 @@ def make_follow(self, actor_acct_uri: str, to_follow_actor_acct_uri: str) -> Non # Python 3.12 @override def set_auto_accept_follow(self, actor_acct_uri: str, auto_accept_follow: bool = True) -> None: - if self._auto_accept_follow == auto_accept_follow: - return + if auto_accept_follow: + return # Default for Mastodon + raise NotImplementedByNodeError(self, NodeWithMastodonAPI.set_auto_accept_follow) # Can't find an API call for this diff --git a/src/feditest/protocols/fediverse/__init__.py b/src/feditest/protocols/fediverse/__init__.py index d5aa734..4262385 100644 --- a/src/feditest/protocols/fediverse/__init__.py +++ b/src/feditest/protocols/fediverse/__init__.py @@ -168,6 +168,9 @@ def set_auto_accept_follow(self, actor_acct_uri: str, auto_accept_follow: bool = if they do not have the requested behavior (or it cannot be scripted) and the corresponding tests does not run. """ + if auto_accept_follow: + return # Assumed default + raise NotImplementedByNodeError(self, FediverseNode.set_auto_accept_follow) diff --git a/tests.smoke/tests/nodes_with_mastodon_api_communicate.py b/tests.smoke/tests/nodes_with_mastodon_api_communicate.py index 6d8fc1c..de66285 100644 --- a/tests.smoke/tests/nodes_with_mastodon_api_communicate.py +++ b/tests.smoke/tests/nodes_with_mastodon_api_communicate.py @@ -17,7 +17,6 @@ def __init__(self, ) -> None: self.leader_node = leader_node self.leader_actor_acct_uri = None - self.leader_node.set_auto_accept_follow(True) self.follower_node = follower_node self.follower_actor_acct_uri = None @@ -29,6 +28,7 @@ def __init__(self, def provision_actors(self): self.leader_actor_acct_uri = self.leader_node.obtain_actor_acct_uri() assert self.leader_actor_acct_uri + self.leader_node.set_auto_accept_follow(self.leader_actor_acct_uri, True) self.follower_actor_acct_uri = self.follower_node.obtain_actor_acct_uri() assert self.follower_actor_acct_uri