def METHOD_NAME(self, index_text):
    # with not ascii chars in index_text test fails on travis-ci
    stat_class = namedtuple('stat_class', ['st_mtime'])
    time_time = 1105022732.0
    stat = stat_class(st_mtime=time_time)
    with patch("monitorrent.rest.static_file.open", mock_open(read_data=index_text), create=True), \
            patch("monitorrent.rest.static_file.os.path.isfile", Mock(return_value=True), create=True), \
            patch("monitorrent.rest.static_file.os.stat", Mock(return_value=stat), create=True), \
            patch("monitorrent.rest.static_file.mimetypes.guess_type", Mock(return_value=('text/html', 'utf-8')),
                  create=True), \
            patch("monitorrent.rest.static_file.os.path.getsize", MagicMock(return_value=len(index_text)),
                  create=True):
        s = StaticFiles('folder', 'index.html', False)
        self.api.add_route('/index.html', s)
        body = self.simulate_request('/index.html')
        self.assertEqual(self.srmock.status, falcon.HTTP_OK)
        self.assertEqual('text/html', self.srmock.headers_dict['content-type'])
        self.assertEqual(str(len(index_text)), self.srmock.headers_dict['content-length'])
        self.assertEqual('Thu, 06 Jan 2005 14:45:32 GMT', self.srmock.headers_dict['last-modified'])
        self.assertEqual('1105022732.0', self.srmock.headers_dict['etag'])
        self.assertEqual(str(next(body)), index_text)