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.

23 lines
810 B

  1. # -*- coding: utf-8 -*-
  2. # Copyright 2018 Therp BV <https://therp.nl>
  3. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
  4. from openerp.tests.common import SingleTransactionCase
  5. from ..wizards.res_partner_gdpr import FIELDS_GDPR
  6. class TestPrivacyGdpr(SingleTransactionCase):
  7. def _create_test_customer(self):
  8. vals = {}
  9. for field in FIELDS_GDPR:
  10. if field == 'name':
  11. vals.update({field: 'Name'})
  12. else:
  13. vals.update({field: False})
  14. return self.env['res.partner'].create(vals)
  15. def _gdpr_cleanup(self, customer):
  16. wiz = self.env['res.partner.gdpr'].create({
  17. 'partner_ids': [(6, False, customer.ids)]})
  18. self.assertTrue(wiz.fields, True)
  19. wiz.action_gdpr_res_partner_cleanup()