def capture_verify_urls_err(self, urls, app): sys.stderr = StringIO() sys.stdout = StringIO() verify_urls(urls, app) res = sys.stderr.getvalue() sys.stderr = self.stderr sys.stdout = self.stdout return res
def capture_verify_urls(self, urls, app): sys.stdout = StringIO() sys.stderr = StringIO() verify_urls(urls, app) out = sys.stdout.getvalue() err = sys.stderr.getvalue() sys.stdout = self.stdout sys.stderr = self.stderr return out, err