Commit 0020ca96 authored by Jérome Perrin's avatar Jérome Perrin

testDynamicClassGeneration: verify runLiveTest uses a different request

parent a1766606
Pipeline #26830 passed with stage
in 0 seconds
...@@ -3162,6 +3162,12 @@ class Test(ERP5TypeTestCase): ...@@ -3162,6 +3162,12 @@ class Test(ERP5TypeTestCase):
def test_01_sampleTest(self): def test_01_sampleTest(self):
self.assertEqual(0, 0) self.assertEqual(0, 0)
request = self.portal.REQUEST
self.assertIsNone(request.get('foo'))
request.set('foo', 'bar')
self.assertEqual(request.get('foo'), 'bar')
def afterClear(self): def afterClear(self):
super(Test, self).afterClear() super(Test, self).afterClear()
...@@ -3206,6 +3212,9 @@ class Test(ERP5TypeTestCase): ...@@ -3206,6 +3212,9 @@ class Test(ERP5TypeTestCase):
self._component_tool.reset(force=True, self._component_tool.reset(force=True,
reset_portal_type_at_transaction_boundary=True) reset_portal_type_at_transaction_boundary=True)
# set a request key, that should not be set from the test request
self.portal.REQUEST.set('foo', 'something from main request')
# ERP5TypeLiveTestCase.runLiveTest patches ERP5TypeTestCase bases, thus it # ERP5TypeLiveTestCase.runLiveTest patches ERP5TypeTestCase bases, thus it
# needs to be restored after calling runLiveTest # needs to be restored after calling runLiveTest
base_tuple = ERP5TypeTestCase.__bases__ base_tuple = ERP5TypeTestCase.__bases__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment