You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
852 B

  1. # -*- coding: utf-8 -*-
  2. # (c) 2015 Antiun Ingeniería S.L. - Sergio Teruel
  3. # (c) 2015 Antiun Ingeniería S.L. - Carlos Dauden
  4. # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
  5. from openerp.tests.common import TransactionCase
  6. class TestSAuthSupplier(TransactionCase):
  7. def setUp(self):
  8. super(TestSAuthSupplier, self).setUp()
  9. ir_config_parameter = self.env['ir.config_parameter']
  10. ir_config_parameter.set_param('auth_signup.allow_uninvited', 'True')
  11. def test_user_signup(self):
  12. values = {
  13. 'login': 'test@test.com',
  14. 'name': 'test',
  15. 'password': '1234',
  16. 'account_type': 'supplier'
  17. }
  18. user_obj = self.env['res.users']
  19. user = user_obj.browse(user_obj._signup_create_user(values))
  20. self.assertTrue(user.partner_id.supplier)