File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -310,7 +310,7 @@ def _clean_document_path(path):
310
310
311
311
312
312
def document_url (doc ):
313
- if doc .metadata [ "parents" ] == DocumentationCategory .WEBSITE .value :
313
+ if doc .metadata . get ( "parents" ) == DocumentationCategory .WEBSITE .value :
314
314
return doc .path
315
315
elif doc .path :
316
316
kwargs = {
Original file line number Diff line number Diff line change @@ -632,7 +632,7 @@ def setUpTestData(cls):
632
632
},
633
633
# I'm not sure if this is valid or not.
634
634
{
635
- "metadata" : {"parents" : "topics" },
635
+ "metadata" : {},
636
636
"path" : "" ,
637
637
"release" : cls .release ,
638
638
"title" : "Index" ,
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ def test_search_type_filter_all(self):
91
91
)
92
92
self .assertEqual (response .status_code , 200 )
93
93
self .assertContains (
94
- response , "4 results for <em>generic</em> in version 5.1" , html = True
94
+ response , "5 results for <em>generic</em> in version 5.1" , html = True
95
95
)
96
96
self .assertContains (response , self .active_filter , count = 1 )
97
97
self .assertContains (response , f"{ self .active_filter } All</a>" , html = True )
@@ -122,7 +122,7 @@ def test_search_category_filter_invalid_doc_categories(self):
122
122
)
123
123
self .assertEqual (response .status_code , 200 )
124
124
self .assertContains (
125
- response , "4 results for <em>generic</em> in version 5.1" , html = True
125
+ response , "5 results for <em>generic</em> in version 5.1" , html = True
126
126
)
127
127
self .assertContains (response , self .active_filter , count = 1 )
128
128
self .assertContains (response , f"{ self .active_filter } All</a>" , html = True )
You can’t perform that action at this time.
0 commit comments