code: def text_assert(self, anchor, byte=False):
          
  
          if not self.text_search(anchor, byte=byte):
              raise DataNotFound(u'Substring not found: %s' % anchor)
docs: If `anchor` is not found then raise `DataNotFound` exception.