Skip to content

Commit

Permalink
increase coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens Hinghaus committed May 9, 2019
1 parent c911efe commit d94b267
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/OFS/tests/testFindSupport.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,14 @@ def test_find_text_nondecodable(self):
encoded = b'\xf6'
self.base['bytes'] = DummyItem('bytes', text=encoded)

def SearchableText():
return encoded
st_item = DummyItem('text')
st_item.SearchableText = SearchableText
self.base['text'] = st_item
try:
self.base.ZopeFind(self.base, obj_searchterm='anything')
except UnicodeDecodeError:
except UnicodeDecodeError: # pragma: no cover
self.fail('ZopeFind in undecodable data raises UnicodeDecodeError')

def test_find_text_tainted(self):
Expand Down

0 comments on commit d94b267

Please sign in to comment.