291 self.execute('DELETE CWProperty X WHERE X pkey "ui.language"') |
291 self.execute('DELETE CWProperty X WHERE X pkey "ui.language"') |
292 self.assertEqual(vreg.property_value('ui.language'), 'de') |
292 self.assertEqual(vreg.property_value('ui.language'), 'de') |
293 self.commit() |
293 self.commit() |
294 self.assertEqual(vreg.property_value('ui.language'), 'en') |
294 self.assertEqual(vreg.property_value('ui.language'), 'en') |
295 |
295 |
296 def test_fb_login_concept(self): |
|
297 """see data/views.py""" |
|
298 self.set_auth_mode('cookie', 'anon') |
|
299 self.login('anon') |
|
300 req = self.request() |
|
301 origcnx = req.cnx |
|
302 req.form['__fblogin'] = u'turlututu' |
|
303 page = self.app.handle_request(req, '') |
|
304 self.assertFalse(req.cnx is origcnx) |
|
305 self.assertEqual(req.user.login, 'turlututu') |
|
306 self.assertTrue('turlututu' in page, page) |
|
307 req.cnx.close() # avoid warning |
|
308 |
|
309 # authentication tests #################################################### |
296 # authentication tests #################################################### |
310 |
297 |
311 def test_http_auth_no_anon(self): |
298 def test_http_auth_no_anon(self): |
312 req, origsession = self.init_authentication('http') |
299 req, origsession = self.init_authentication('http') |
313 self.assertAuthFailure(req) |
300 self.assertAuthFailure(req) |