remove caching
This commit is contained in:
@@ -95,39 +95,6 @@ def test_upsert_listing_details_and_urls(db_ready):
|
||||
pass
|
||||
|
||||
|
||||
def test_cached_page_upsert_and_get(db_ready):
|
||||
jid_suffix = unique_suffix()
|
||||
url = f"https://example.org/it/{jid_suffix}.html"
|
||||
# Ensure a listing exists for FK relation if enforced
|
||||
db.upsert_listing(
|
||||
url=url,
|
||||
region="it",
|
||||
keyword="cache",
|
||||
title=f"IT Cache {jid_suffix}",
|
||||
pay="N/A",
|
||||
location="Test City",
|
||||
timestamp=now_iso(),
|
||||
)
|
||||
fp = f"/tmp/integration_{jid_suffix}.html"
|
||||
db.upsert_cached_page(
|
||||
file_path=fp,
|
||||
url_guess=url,
|
||||
last_modified=now_iso(),
|
||||
size_bytes=123,
|
||||
job_id=int(jid_suffix) if jid_suffix.isdigit() else None,
|
||||
)
|
||||
row = db.db_get_cache_url(url)
|
||||
if row is not None:
|
||||
assert row["url_guess"] == url
|
||||
# Cleanup
|
||||
try:
|
||||
db.remove_cached_page(fp)
|
||||
db.db_remove_cached_url(url)
|
||||
db.db_delete_job(jid_suffix)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
def test_user_interactions_mark_and_visit(db_ready):
|
||||
uname = f"it_user_{unique_suffix()}"
|
||||
db.create_or_update_user(uname, is_active=True)
|
||||
|
||||
Reference in New Issue
Block a user