I just uncovered a method which failed on Python 3 for using
str-input and failed with a
TypeError: a bytes-like object is required, not 'str'.
The fix was easy, but I cannot figure out how to capture what gets written by
response.write in order to use it for my test's assert statement.
Anybody has a clue?
The method looks like that:
def reindexIndex(self, REQUEST=None): """ reindex a single index at a catalog """ response = REQUEST.RESPONSE response.setHeader("Content-Type", "text/plain") response.write(b"Reindexing Index...\n") response.write(b"===================\n") cat = self.classCatalog(REQUEST.className) cat.reindexIndex(REQUEST.indexName, REQUEST) response.write(b"\n\nDONE.")
The test looks like...
rv = mm.reindexIndex(request) assert ???
I cannot "find" the
DONE neither by introspecting