From 00f2585d8c4dac4c6c29e8e5984f8446432c4f92 Mon Sep 17 00:00:00 2001 From: link2xt Date: Mon, 8 Apr 2024 14:14:54 +0000 Subject: [PATCH] api(deltachat-rpc-client): add ACFactory.get_accepted_chat() --- .../src/deltachat_rpc_client/pytestplugin.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/deltachat-rpc-client/src/deltachat_rpc_client/pytestplugin.py b/deltachat-rpc-client/src/deltachat_rpc_client/pytestplugin.py index cbc933654..7d0ce5a4f 100644 --- a/deltachat-rpc-client/src/deltachat_rpc_client/pytestplugin.py +++ b/deltachat-rpc-client/src/deltachat_rpc_client/pytestplugin.py @@ -4,7 +4,7 @@ from typing import AsyncGenerator, List, Optional import pytest -from . import Account, AttrDict, Bot, Client, DeltaChat, EventType, Message +from . import Account, AttrDict, Bot, Chat, Client, DeltaChat, EventType, Message from ._utils import futuremethod from .rpc import Rpc @@ -71,6 +71,10 @@ class ACFactory: ac_clone.configure() return ac_clone + def get_accepted_chat(self, ac1: Account, ac2: Account) -> Chat: + ac2.create_chat(ac1) + return ac1.create_chat(ac2) + def send_message( self, to_account: Account,