@@ -20,7 +20,10 @@ def test_simple(self):
20
20
response = self .get ()
21
21
self .assertEqual (response .status_code , 200 )
22
22
self .assertTemplateUsed (response , "wagtailadmin/generic/index.html" )
23
- self .assertBreadcrumbsNotRendered (response .content )
23
+ self .assertBreadcrumbsItemsRendered (
24
+ [{"url" : "" , "label" : "Locales" }],
25
+ response .content ,
26
+ )
24
27
25
28
26
29
class TestLocaleCreateView (AdminTemplateTestUtils , WagtailTestUtils , TestCase ):
@@ -43,7 +46,13 @@ def test_simple(self):
43
46
response = self .get ()
44
47
self .assertEqual (response .status_code , 200 )
45
48
self .assertTemplateUsed (response , "wagtaillocales/create.html" )
46
- self .assertBreadcrumbsNotRendered (response .content )
49
+ self .assertBreadcrumbsItemsRendered (
50
+ [
51
+ {"label" : "Locales" , "url" : "/admin/locales/" },
52
+ {"label" : "New: Locale" , "url" : "" },
53
+ ],
54
+ response .content ,
55
+ )
47
56
48
57
self .assertEqual (
49
58
response .context ["form" ].fields ["language_code" ].choices , [("fr" , "French" )]
@@ -116,7 +125,13 @@ def test_simple(self):
116
125
response = self .get ()
117
126
self .assertEqual (response .status_code , 200 )
118
127
self .assertTemplateUsed (response , "wagtaillocales/edit.html" )
119
- self .assertBreadcrumbsNotRendered (response .content )
128
+ self .assertBreadcrumbsItemsRendered (
129
+ [
130
+ {"url" : "/admin/locales/" , "label" : "Locales" },
131
+ {"url" : "" , "label" : str (self .english )},
132
+ ],
133
+ response .content ,
134
+ )
120
135
121
136
self .assertEqual (
122
137
response .context ["form" ].fields ["language_code" ].choices ,
0 commit comments