Commit 9405ec7d authored by Jérome Perrin's avatar Jérome Perrin

Fix some typos

parent e5be3a3a
Pipeline #22655 failed with stage
in 0 seconds
......@@ -92,11 +92,11 @@ class Session(UserDict):
# used to set duration of session
session_duration = None
# a handle to current aquisition context
# a handle to current acquisition context
_aq_context = None
def __getstate__(self):
"""filter out acqusition wrappers when serializing.
"""filter out acquisition wrappers when serializing.
"""
state = {
'session_duration': self.session_duration,
......@@ -107,12 +107,12 @@ class Session(UserDict):
return state
def _updatecontext(self, aq_context):
""" Update current aquisition context. """
""" Update current acquisition context. """
self._aq_context = aq_context
def __getitem__(self, key):
if key in self.data:
# returned it wrapped in aquisition context
# returned it wrapped in acquisition context
return restore_acquisition_wrapper(self.data[key], self._aq_context)
raise KeyError(key)
......@@ -213,10 +213,10 @@ class SessionTool(BaseTool):
shopping_cart = session['shopping_cart']
Please note that:
- developer is responsible for handling an unique sessiond_id (using cookies for example).
- developer is responsible for handling an unique session_id (using cookies for example).
- it's not recommended to store in portal_sessions ZODB persistent objects because in order
to store them in Local RAM portal_sessions tool will remove aquisition wrapper. At "get"
request they'll be returend wrapped.
to store them in Local RAM portal_sessions tool will remove acquisition wrapper. At "get"
request they'll be returned wrapped.
- developer can store temporary ERP5 documents like 'TempOrder', but keep
in mind that after making changes to temporary documents they need to be
saved again in portal_sessions, so:
......
......@@ -201,7 +201,7 @@ class SkinDataCleanup:
if skindata is not None:
if self.hashSkinData(skindata) == self.skindata_id:
try:
# Entry might have already disapeared. Ignore.
# Entry might have already disappeared. Ignore.
del SKINDATA[tid]
except KeyError:
pass
......
......@@ -78,14 +78,14 @@ class ERP5TypeLiveTestCase(ERP5TypeTestCaseMixin):
def getPortal(self):
"""Returns the portal object, i.e. the "fixture root".
Rewrap the portal in an independant request for this test.
Rewrap the portal in an independent request for this test.
"""
if self.portal is not None:
return self.portal
from Products.ERP5.ERP5Site import getSite
site = getSite()
# reconstruct the acquistion chain with an independant request.
# reconstruct the acquisition chain with an independent request.
# RequestContainer -> Application -> Site
from Testing.ZopeTestCase.utils import makerequest
portal = getattr(makerequest(site.aq_parent), site.getId())
......
......@@ -544,7 +544,7 @@ class ERP5TypeTestCaseMixin(ProcessingNodeTestCase, PortalTestCase):
User password is the reference.
"""
user = self.createUser(reference, person_kw=dict(title=title))
assignment = self.createUserAssignement(user, assignment_kw=dict(function=function))
assignment = self.createUserAssignment(user, assignment_kw=dict(function=function))
return user
def createUser(self, reference, password=None, person_kw=None):
......
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