MCPcopy Create free account
hub / github.com/chatmail/core / test_chat_idempotent

Method test_chat_idempotent

python/tests/test_3_offline.py:206–220  ·  view source on GitHub ↗
(self, chat1, ac1)

Source from the content-addressed store, hash-verified

204 chat1.account.get_chat_by_id(123123)
205
206 def test_chat_idempotent(self, chat1, ac1):
207 contact1 = chat1.get_contacts()[0]
208 chat2 = contact1.create_chat()
209 chat3 = None
210 assert chat2.id == chat1.id
211 assert chat2.get_name() == chat1.get_name()
212 assert chat1 == chat2
213 assert not chat1.__ne__(chat2)
214 assert chat1 != chat3
215
216 for ichat in ac1.get_chats():
217 if ichat.id == chat1.id:
218 break
219 else:
220 pytest.fail("could not find chat")
221
222 def test_group_chat_add_second_account(self, acfactory):
223 ac1 = acfactory.get_pseudo_configured_account()

Callers

nothing calls this directly

Calls 5

get_chatsMethod · 0.80
get_contactsMethod · 0.45
create_chatMethod · 0.45
get_nameMethod · 0.45
__ne__Method · 0.45

Tested by

no test coverage detected