File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -125,13 +125,11 @@ def test_breadcrumb_template_included(self):
125125
126126 def test_blog_posting_template_included (self ):
127127 """Test that blog posting JSON-LD template is included for blog pages."""
128- # This test would need to be run on an actual blog page
129- # For now, we'll just verify the template exists
130- try :
131- template = get_template ("patterns/pages/blog/blog-posting-jsonld.html" )
132- self .assertIsNotNone (template )
133- except Exception as e :
134- self .fail (f"Blog posting JSON-LD template not found: { e } " )
128+ response = self .client .get (self .blog_post .url )
129+ schema = self ._extract_jsonld_by_type (response .content , "BlogPosting" )
130+
131+ self .assertGreater (len (schema ), 0 , "BlogPosting JSON-LD not found" )
132+ self .assertEqual (schema [0 ]["headline" ], "Test Blog Post" )
135133
136134 def test_breadcrumb_template_exists (self ):
137135 """Test that breadcrumb JSON-LD template exists."""
You can’t perform that action at this time.
0 commit comments