@@ -356,8 +356,8 @@ def test_recent_drafts(self):
356356 self .assertEqual (r .status_code , 200 )
357357 q = PyQuery (r .content )
358358 self .assertEqual (len (q ('td.doc' )),3 )
359- self .assertEqual (q ('td.status span.badge.bg -warning' ). text (), "for 15 days" )
360- self .assertEqual (q ('td.status span.badge.bg -danger' ). text (), "for 29 days" )
359+ self .assertTrue (q ('td.status span.text -warning *[title*="%s"]' % "for 15 days" ) )
360+ self .assertTrue (q ('td.status span.text -danger *[title*="%s"]' % "for 29 days" ) )
361361 for ah in [draft .action_holders .first () for draft in drafts ]:
362362 self .assertContains (r , escape (ah .name ))
363363
@@ -1297,8 +1297,8 @@ def test_edit_authors_edit_fields(self):
12971297 @staticmethod
12981298 def _pyquery_select_action_holder_string (q , s ):
12991299 """Helper to use PyQuery to find an action holder in the draft HTML"""
1300- # selector grabs the action holders heading and finds siblings with a div containing the search string
1301- return q ('th:contains("Action Holder") ~ td>div:contains("%s")' % s )
1300+ # selector grabs the action holders heading and finds siblings with a div containing the search string (also in any title attribute)
1301+ return q ('th:contains("Action Holder") ~ td>div:contains("%s"), th:contains("Action Holder") ~ td>div *[title*="%s"] ' % ( s , s ) )
13021302
13031303 @mock .patch .object (Document , 'action_holders_enabled' , return_value = False , new_callable = mock .PropertyMock )
13041304 def test_document_draft_hides_action_holders (self , mock_method ):
@@ -2852,4 +2852,4 @@ def test_pdfized(self):
28522852 self .should_succeed (dict (name = rfc .name ,rev = f'{ r :02d} ' ))
28532853 for ext in ('pdf' ,'txt' ,'html' ,'anythingatall' ):
28542854 self .should_succeed (dict (name = rfc .name ,rev = f'{ r :02d} ' ,ext = ext ))
2855- self .should_404 (dict (name = rfc .name ,rev = '02' ))
2855+ self .should_404 (dict (name = rfc .name ,rev = '02' ))
0 commit comments