<commit_before># -*- encoding: utf-8 -*-
##############################################################################
#
#    Copyright (C) 2015 Compassion CH (http://www.compassion.ch)
#    Releasing children from poverty in Jesus' name
#    @author: <NAME> <<EMAIL>>
#
#    The licence is in the file __openerp__.py
#
##############################################################################

from openerp.tests import common
import logging
logger = logging.getLogger(__name__)


class test_base_contract(common.TransactionCase):

    def setUp(self):
        super(test_base_contract, self).setUp()
        # Creation of an account
        account_obj = self.env['account.account']
        account_type_obj = self.env['account.account.type']
        account_type = account_type_obj.search([
            ('code', '=', 'receivable')]).ids[0]
        property_account_receivable = account_obj.search([
            ('type', '=', 'receivable'),
            ('user_type', '=', account_type)]).ids[0]
        account_type = account_type_obj.search([
            ('code', '=', 'payable')]).ids[0]
        property_account_payable = account_obj.search([
            ('type', '=', 'payable'),
            ('user_type', '=', account_type)]).ids[0]
        category = self.env['res.partner.category'].create({
            'name': 'sponsor'})
        # Creation of partners
        partner_obj = self.env['res.partner']
        self.partners = partner_obj.create(
            {
                'name': 'Monsieur Client 137',
                'property_account_receivable': property_account_receivable,
                'property_account_payable': property_account_payable,
                'notify_email': 'none',
                'ref': '00001111',
                'lang': 'en_US',
            })
        self.partners += partner_obj.create(
            {
                'name': '<NAME>',
                'property_account_receivable': property_account_receivable,
                'property_account_payable': property_account_payable,
                'notify_email': 'none',
                'ref': '00002222',
                'lang': 'en_US',
            })
        self.partners += partner_obj.create({
            'name': '<NAME>',
            'property_account_receivable': property_account_receivable,
            'property_account_payable': property_account_payable,
            'notify_email': 'always',
            'ref': '00003333',
            'lang': 'en_US',
        })
        self.partners += partner_obj.create(
            {
                'lang': 'en_US',
                'lastname': 'Client 37',
                'property_account_receivable': property_account_receivable,
                'property_account_payable': property_account_payable,
                'notification_email_send': 'none',
                'category_id': [(4, category.id)],
            })
        # Creation of payement terms
        payment_term_obj = self.env['account.payment.term']
        self.payment_term_id = payment_term_obj.search(
            [('name', '=', '15 Days')])[0].id

    def _create_group(self, change_method, partner_id,<commit_msg>fix name field<commit_after># -*- encoding: utf-8 -*-
##############################################################################
#
#    Copyright (C) 2015 Compassion CH (http://www.compassion.ch)
#    Releasing children from poverty in Jesus' name
#    @author: <NAME> <<EMAIL>>
#
#    The licence is in the file __openerp__.py
#
##############################################################################

from openerp.tests import common
import logging
logger = logging.getLogger(__name__)


class test_base_contract(common.TransactionCase):

    def setUp(self):
        super(test_base_contract, self).setUp()
        # Creation of an account
        account_obj = self.env['account.account']
        account_type_obj = self.env['account.account.type']
        account_type = account_type_obj.search([
            ('code', '=', 'receivable')]).ids[0]
        property_account_receivable = account_obj.search([
            ('type', '=', 'receivable'),
            ('user_type', '=', account_type)]).ids[0]
        account_type = account_type_obj.search([
            ('code', '=', 'payable')]).ids[0]
        property_account_payable = account_obj.search([
            ('type', '=', 'payable'),
            ('user_type', '=', account_type)]).ids[0]
        category = self.env['res.partner.category'].create({
            'name': 'sponsor'})
        # Creation of partners
        partner_obj = self.env['res.partner']
        self.partners = partner_obj.create(
            {
                'name': 'Monsieur Client 137',
                'property_account_receivable': property_account_receivable,
                'property_account_payable': property_account_payable,
                'notify_email': 'none',
                'ref': '00001111',
                'lang': 'en_US',
            })
        self.partners += partner_obj.create(
            {
                'name': '<NAME>',
                'property_account_receivable': property_account_receivable,
                'property_account_payable': property_account_payable,
                'notify_email': 'none',
                'ref': '00002222',
                'lang': 'en_US',
            })
        self.partners += partner_obj.create({
            'name': '<NAME>',
            'property_account_receivable': property_account_receivable,
            'property_account_payable': property_account_payable,
            'notify_email': 'always',
            'ref': '00003333',
            'lang': 'en_US',
        })
        self.partners += partner_obj.create(
            {
                'lang': 'en_US',
                'name': 'Client 37',
                'property_account_receivable': property_account_receivable,
                'property_account_payable': property_account_payable,
                'notification_email_send': 'none',
                'category_id': [(4, category.id)],
            })
        # Creation of payement terms
        payment_term_obj = self.env['account.payment.term']
        self.payment_term_id = payment_term_obj.search(
            [('name', '=', '15 Days')])[0].id

    def _create_group(self, change_method, partner_id,
{'fraction_non_alphanumeric': 0.17700526231860947, 'fraction_numerical': 0.013394992824110987, 'mean_word_length': 2.3062730627306274, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3512480', 'n_tokens_mistral': 1862, 'n_tokens_neox': 1715, 'n_words': 305}