From 00bad59920faa2186f499fe820198121c8136069 Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Mon, 5 Jan 2026 14:57:49 -0500 Subject: [PATCH] Fix test_database.py method names to match Database API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - upsert_page → store_page (2 occurrences) - get_media → get_media_by_hash (2 occurrences) - search_media → search_media_advanced --- tests/unit/test_database.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/unit/test_database.py b/tests/unit/test_database.py index f7b990e..d7887a6 100644 --- a/tests/unit/test_database.py +++ b/tests/unit/test_database.py @@ -266,7 +266,7 @@ class TestMediaOperations: ) # Verify media was created - media = await db.get_media("d41d8cd98f00b204e9800998ecf8427e") + media = await db.get_media_by_hash("d41d8cd98f00b204e9800998ecf8427e") assert media is not None assert media['media_type'] == 'image' @@ -299,7 +299,7 @@ class TestMediaOperations: ) # Should still have only one media record - media = await db.get_media("d41d8cd98f00b204e9800998ecf8427e") + media = await db.get_media_by_hash("d41d8cd98f00b204e9800998ecf8427e") assert media is not None # But should have two sources @@ -329,7 +329,7 @@ class TestPageOperations: job_id = await db.create_crawl_job(target_uri="https://example.com") - await db.upsert_page( + await db.store_page( uri="https://example.com/about", title="About Page", content="This is the about page content.", @@ -351,7 +351,7 @@ class TestPageOperations: job_id = await db.create_crawl_job(target_uri="https://example.com") - await db.upsert_page( + await db.store_page( uri="https://example.com/test", title="Test", content="Test content", @@ -395,7 +395,7 @@ class TestSearchOperations: searchable_text="sunset ocean beautiful landscape", ) - results = await db.search_media("sunset", limit=10) + results = await db.search_media_advanced(q="sunset", limit=10) # Result depends on search implementation assert isinstance(results, list)