--- a/devtools/testlib.py Tue Mar 16 12:40:59 2010 +0100
+++ b/devtools/testlib.py Tue Mar 16 17:44:32 2010 +0100
@@ -503,7 +503,7 @@
req.cnx = None
sh = self.app.session_handler
authm = sh.session_manager.authmanager
- authm.authinforetreivers[-1].anoninfo = self.vreg.config.anonymous_user()
+ authm.anoninfo = self.vreg.config.anonymous_user()
# not properly cleaned between tests
self.open_sessions = sh.session_manager._sessions = {}
return req, origcnx
--- a/web/test/unittest_views_pyviews.py Tue Mar 16 12:40:59 2010 +0100
+++ b/web/test/unittest_views_pyviews.py Tue Mar 16 17:44:32 2010 +0100
@@ -9,10 +9,10 @@
content = view.render(pyvalue=[[1, 'a'], [2, 'b']],
headers=['num', 'char'])
self.assertEquals(content.strip(), '''<table class="listing">
-<tr><th>num</th><th>char</th></tr>
-<tr><td>1</td><td>a</td></tr>
+<thead><tr><th>num</th><th>char</th></tr>
+</thead><tbody><tr><td>1</td><td>a</td></tr>
<tr><td>2</td><td>b</td></tr>
-</table>''')
+</tbody></table>''')
def test_pyvallist(self):
view = self.vreg['views'].select('pyvallist', self.request(),
--- a/web/test/unittest_viewselector.py Tue Mar 16 12:40:59 2010 +0100
+++ b/web/test/unittest_viewselector.py Tue Mar 16 17:44:32 2010 +0100
@@ -67,6 +67,7 @@
req = self.request()
self.assertListEqual(self.pviews(req, None),
[('changelog', wdoc.ChangeLogView),
+ ('gc', debug.GCView),
('index', startup.IndexView),
('info', debug.ProcessInformationView),
('manage', startup.ManageView),
--- a/web/views/authentication.py Tue Mar 16 12:40:59 2010 +0100
+++ b/web/views/authentication.py Tue Mar 16 17:44:32 2010 +0100
@@ -140,13 +140,13 @@
# restore an anonymous connection if possible
login, password = self.anoninfo
if login:
- return self._authenticate(req, login, {'password': password})
+ cnx = self._authenticate(req, login, {'password': password})
+ cnx.anonymous_connection = True
+ return cnx
raise ExplicitLogin()
def _init_cnx(self, cnx, login, authinfo):
# decorate connection
- if login == self.vreg.config.anonymous_user()[0]:
- cnx.anonymous_connection = True
cnx.vreg = self.vreg
cnx.login = login
cnx.authinfo = authinfo
--- a/web/views/debug.py Tue Mar 16 12:40:59 2010 +0100
+++ b/web/views/debug.py Tue Mar 16 17:44:32 2010 +0100
@@ -119,7 +119,7 @@
def call(self, **kwargs):
self.w(u'<h1>%s</h1>' % _("Registry's content"))
keys = sorted(self._cw.vreg)
- url = self._cw.url()
+ url = xml_escape(self._cw.url())
self.w(u'<p>%s</p>\n' % ' - '.join('<a href="%s#%s">%s</a>'
% (url, key, key) for key in keys))
for key in keys: