From 2f424809e982ba027adcfa61c3c767cd66b783c2 Mon Sep 17 00:00:00 2001 From: Maurits van Rees Date: Tue, 17 Oct 2023 21:49:24 +0200 Subject: [PATCH] Fixes by pre-commit. --- src/plone/rest/tests/test_explicitacquisition.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plone/rest/tests/test_explicitacquisition.py b/src/plone/rest/tests/test_explicitacquisition.py index fc482bd..beee007 100644 --- a/src/plone/rest/tests/test_explicitacquisition.py +++ b/src/plone/rest/tests/test_explicitacquisition.py @@ -11,6 +11,7 @@ import unittest + try: from Products.CMFCore.interfaces import IShouldAllowAcquiredItemPublication @@ -78,7 +79,7 @@ def traverse(self, path="/plone", accept="application/json", method="GET"): request.environ["PATH_TRANSLATED"] = path request.environ["HTTP_ACCEPT"] = accept request.environ["REQUEST_METHOD"] = method - auth = "%s:%s" % (SITE_OWNER_NAME, SITE_OWNER_PASSWORD) + auth = f"{SITE_OWNER_NAME}:{SITE_OWNER_PASSWORD}" b64auth = b64encode(auth.encode("utf8")) request._auth = "Basic %s" % b64auth.decode("utf8") notify(PubStart(request))