mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-01-02 17:05:38 +10:00
Fix tautological assertion in SEO test
The assertion was checking 'has_seo_data or seo_data' inside an 'if seo_data:' block, making it always truthy. Changed to just check 'has_seo_data' to properly verify that expected SEO keys were extracted. Co-authored-by: Nick Sweeting <pirate@users.noreply.github.com>
This commit is contained in:
@@ -123,7 +123,7 @@ class TestSEOWithChrome(TestCase):
|
||||
if seo_data:
|
||||
# Verify we got some SEO data
|
||||
has_seo_data = any(key in seo_data for key in ['title', 'description', 'og:title', 'canonical', 'meta'])
|
||||
self.assertTrue(has_seo_data or seo_data, f"No SEO data extracted: {seo_data}")
|
||||
self.assertTrue(has_seo_data, f"No SEO data extracted: {seo_data}")
|
||||
|
||||
except RuntimeError as e:
|
||||
if 'Chrome' in str(e) or 'CDP' in str(e):
|
||||
|
||||
Reference in New Issue
Block a user