Skip to content

Commit 635bf8b

Browse files
committed
fix: update LlamaCloud test assertions to reflect new parse modes
- Changed assertions in `test_llamacloud_basic_uses_cost_effective_tier` to check for `parse_page_with_llm` instead of `cost_effective` tier. - Updated `test_llamacloud_premium_uses_agentic_plus_tier` to verify `parse_page_with_agent` instead of `agentic_plus` tier. - Ensured that `tier` is no longer included in the call arguments.
1 parent e7fba02 commit 635bf8b

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

surfsense_backend/tests/unit/etl_pipeline/test_etl_pipeline_service.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ async def test_azure_di_premium_uses_prebuilt_layout(tmp_path, mocker):
862862

863863

864864
async def test_llamacloud_basic_uses_cost_effective_tier(tmp_path, mocker):
865-
"""Basic mode should use cost_effective tier for LlamaCloud."""
865+
"""Basic mode should use parse_page_with_llm parse_mode for LlamaCloud."""
866866
pdf_file = tmp_path / "report.pdf"
867867
pdf_file.write_bytes(b"%PDF-1.4 fake content " * 10)
868868

@@ -890,11 +890,12 @@ async def test_llamacloud_basic_uses_cost_effective_tier(tmp_path, mocker):
890890

891891
assert result.markdown_content == "# Llama basic"
892892
call_kwargs = llama_parse_cls.call_args[1]
893-
assert call_kwargs["tier"] == "cost_effective"
893+
assert call_kwargs["parse_mode"] == "parse_page_with_llm"
894+
assert "tier" not in call_kwargs
894895

895896

896897
async def test_llamacloud_premium_uses_agentic_plus_tier(tmp_path, mocker):
897-
"""Premium mode should use agentic_plus tier for LlamaCloud."""
898+
"""Premium mode should use parse_page_with_agent parse_mode for LlamaCloud."""
898899
pdf_file = tmp_path / "report.pdf"
899900
pdf_file.write_bytes(b"%PDF-1.4 fake content " * 10)
900901

@@ -922,4 +923,5 @@ async def test_llamacloud_premium_uses_agentic_plus_tier(tmp_path, mocker):
922923

923924
assert result.markdown_content == "# Llama premium"
924925
call_kwargs = llama_parse_cls.call_args[1]
925-
assert call_kwargs["tier"] == "agentic_plus"
926+
assert call_kwargs["parse_mode"] == "parse_page_with_agent"
927+
assert "tier" not in call_kwargs

0 commit comments

Comments
 (0)