From 36eb1701604a99fbaf60bf477df45cf0ac6f4ea9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Fri, 9 Feb 2024 00:26:39 +0900
Subject: [PATCH] core_test: testAutoLogout py3

---
 .../portal_components/test.erp5.testAutoLogout.py      | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testAutoLogout.py b/bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testAutoLogout.py
index 90956f6634..2470744b90 100644
--- a/bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testAutoLogout.py
+++ b/bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testAutoLogout.py
@@ -29,7 +29,7 @@
 ##############################################################################
 
 from functools import partial
-from six.moves import cStringIO as StringIO
+import io
 import unittest
 from six.moves.urllib.parse import urlencode
 from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
@@ -85,8 +85,8 @@ class TestAuoLogout(ERP5TypeTestCase):
       portal.absolute_url_path() + '/view',
       request_method='POST',
     )
-    response = publish(stdin=StringIO(stdin))
-    self.assertIn('Welcome to ERP5', response.getBody())
+    response = publish(stdin=io.BytesIO(stdin.encode()))
+    self.assertIn(b'Welcome to ERP5', response.getBody())
 
     # check '__ac' cookie has set an expire timeout
     ac_cookie = response.getCookie('__ac')
@@ -100,8 +100,8 @@ class TestAuoLogout(ERP5TypeTestCase):
     self.tic()
     portal.portal_caches.clearAllCache()
 
-    response = publish(stdin=StringIO(stdin))
-    self.assertIn('Welcome to ERP5', response.getBody())
+    response = publish(stdin=io.BytesIO(stdin.encode()))
+    self.assertIn(b'Welcome to ERP5', response.getBody())
     ac_cookie = response.getCookie('__ac')
     self.assertNotEqual(ac_cookie, None)
     self.assertEqual(ac_cookie.get(normalizeCookieParameterName('expires'), None), None)
-- 
2.30.9