Skip to content

Commit

Permalink
Update messages_test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
alejamp committed Dec 20, 2024
1 parent a48a497 commit 5b02b09
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/messages_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from celai_chatwoot.connector.model import WootLead
from celai_chatwoot.connector.model.woot_attachment import WootAttachment, WootLocationAttachment
from celai_chatwoot.connector.model.woot_message import WootMessage
from cel.gateway.model.base_connector import BaseConnector



Expand Down Expand Up @@ -40,6 +41,7 @@ def msg_file_from_tg() -> str:

@pytest.mark.asyncio
async def test_lead_parsing(msg):

lead = WootLead.from_chatwoot_message(msg)

assert isinstance(lead, WootLead)
Expand All @@ -51,7 +53,7 @@ async def test_lead_parsing(msg):
assert lead.metadata['event'] == 'message_created'
assert lead.metadata['message_type'] == 'incoming'
assert lead.metadata['private'] == False
assert lead.connector_name == 'chatwoot'
assert lead.connector_name == None
assert lead.conversation_from.name == 'cold-wind-258'
assert lead.conversation_from.id == '5094'
assert lead.conversation_from.email == 'foo@bar.com'
Expand Down

0 comments on commit 5b02b09

Please sign in to comment.