equal
deleted
inserted
replaced
1 # copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
1 # copyright 2003-2016 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr |
2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr |
3 # |
3 # |
4 # This file is part of CubicWeb. |
4 # This file is part of CubicWeb. |
5 # |
5 # |
6 # CubicWeb is free software: you can redistribute it and/or modify it under the |
6 # CubicWeb is free software: you can redistribute it and/or modify it under the |
32 self.set_option('allow-email-login', 'yes') |
32 self.set_option('allow-email-login', 'yes') |
33 self.assertEqual(self._login_labels(), ['login or email', 'password']) |
33 self.assertEqual(self._login_labels(), ['login or email', 'password']) |
34 self.set_option('allow-email-login', 'no') |
34 self.set_option('allow-email-login', 'no') |
35 self.assertEqual(self._login_labels(), ['login', 'password']) |
35 self.assertEqual(self._login_labels(), ['login', 'password']) |
36 |
36 |
|
37 def test_display_message(self): |
|
38 with self.admin_access.web_request() as req: |
|
39 req.set_message(u'houla hop') |
|
40 page = self.view('logform', req=req, id='loginBox', klass='', template=None) |
|
41 self.assertIn(u'houla hop', page.raw_text) |
|
42 |
37 |
43 |
38 class MainNoTopTemplateTC(CubicWebTC): |
44 class MainNoTopTemplateTC(CubicWebTC): |
39 |
45 |
40 def test_valid_xhtml(self): |
46 def test_valid_xhtml(self): |
41 with self.admin_access.web_request() as req: |
47 with self.admin_access.web_request() as req: |