summaryrefslogtreecommitdiffstats
path: root/python/tests/abstractweb.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/tests/abstractweb.py')
-rw-r--r--python/tests/abstractweb.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/python/tests/abstractweb.py b/python/tests/abstractweb.py
index 6c80ff7a..cdfc1445 100644
--- a/python/tests/abstractweb.py
+++ b/python/tests/abstractweb.py
@@ -143,19 +143,16 @@ class HttpRequestHandlerMixin:
site = None # The virtual host
def respond(self, statusCode = 200, statusMessage = None, headers = None, body = None):
- # Session must be saved before responding. Otherwise, when the server is multitasked or
- # multithreaded, it may receive a new HTTP request before the session is saved.
- if self.session is not None and self.session.isDirty:
- self.session.save()
-
self.httpResponse = self.HttpResponse(
self, statusCode, statusMessage = statusMessage, headers = headers, body = body)
- # Session must be saved before responding. Otherwise, when the server is multitasked or
- # multithreaded, it may receive a new HTTP request before the session is saved.
- # FIXME: For some status codes, session must not be saved. See outputXXX methods in http.
+ # Session and user must be saved before responding. Otherwise, when the server is
+ # multitasked or multithreaded, it may receive a new HTTP request before the session is
+ # saved.
if self.session is not None and self.session.isDirty:
self.session.save()
+ if self.user is not None and self.user.isDirty:
+ self.user.save()
return self.httpResponse.send(self)