thread fix
This commit is contained in:
parent
d58fb8841b
commit
a58ba11566
11 changed files with 177 additions and 30 deletions
|
|
@ -49,6 +49,35 @@ def test_external_reply_subject_uses_customer_subject():
|
|||
assert external_reply_subject("Human Handoff · are you ready?") == "Re: are you ready?"
|
||||
|
||||
|
||||
def test_extracts_reply_before_blockquote_lines():
|
||||
body = """responder: B
|
||||
> sender: A"""
|
||||
result = extract_new_reply_content(body_text=body)
|
||||
assert result["new_reply_content"] == "responder: B"
|
||||
assert "sender: A" in result["quoted_content"]
|
||||
|
||||
|
||||
def test_extracts_reply_from_gmail_on_wrote_without_blank_line():
|
||||
body = """sender: C
|
||||
On Tue, Oct 6, 2026 at 4:29 AM <suyash@gentic.email> wrote:
|
||||
> Responder: B
|
||||
> sender: A"""
|
||||
result = extract_new_reply_content(body_text=body)
|
||||
assert result["new_reply_content"] == "sender: C"
|
||||
assert "Responder: B" in result["quoted_content"]
|
||||
|
||||
|
||||
def test_build_reply_display_uses_clean_snippet():
|
||||
from app.services.reply_extractor import build_reply_display
|
||||
|
||||
body = """responder: D
|
||||
On Tue, Oct 6, 2026 at 4:29 AM wrote:
|
||||
> sender: C"""
|
||||
result = build_reply_display(body_text=body)
|
||||
assert result["snippet"] == "responder: D"
|
||||
assert result["has_quoted_text"] is True
|
||||
|
||||
|
||||
def test_outlook_original_message_split():
|
||||
body = """Thanks for the update.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue