From 8275f5ba00486f49b38a3d837c589a745ed88f0d Mon Sep 17 00:00:00 2001 From: Daniel Havlik Date: Thu, 29 Aug 2019 07:51:37 +0200 Subject: [PATCH] repair incomplete commit from last PR (sry) (#125) --- news/122.bugfix | 2 +- src/plone/recipe/zope2instance/ctl.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/news/122.bugfix b/news/122.bugfix index 3ffd8257..07cd2013 100644 --- a/news/122.bugfix +++ b/news/122.bugfix @@ -1 +1 @@ -Fixed a deprecation warning when importing "makerequest" from Testing.ZopeTestCase.utils. This also fixes a side effect which can bite you if you rely on ZOPETESTCASE environment variable, only being set to "1" during test runs. +Fixed a deprecation warning when importing `makerequest` from Testing.ZopeTestCase.utils. This also fixes a side effect which can bite you if you rely on ZOPETESTCASE environment variable, only being set to `1` during test runs. diff --git a/src/plone/recipe/zope2instance/ctl.py b/src/plone/recipe/zope2instance/ctl.py index a07b8c67..c6fd851e 100644 --- a/src/plone/recipe/zope2instance/ctl.py +++ b/src/plone/recipe/zope2instance/ctl.py @@ -679,7 +679,7 @@ def get_startup_cmd(self, python, more, pyflags=""): if not self.options.no_request: cmdline += ( 'from Testing.makerequest import makerequest; ' - 'app = Testing.makerequest.makerequest(app); ' + 'app = makerequest(app); ' # REQUEST.traverse needs this but no reason not to set # this even if we're not traversing to an object 'app.REQUEST[\'PARENTS\'] = [app]; '