<commit_before># -*- coding: utf-8 -*-
# Copyright 2016 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from openerp.tests.common import TransactionCase


class TestFleetSchedule(TransactionCase):

    def setUp(self, *args, **kwargs):
        super(TestFleetSchedule, self).setUp(*args, **kwargs)

        # TODO Replace this for something useful or delete this method<commit_msg>Add unittest<commit_after># -*- coding: utf-8 -*-
# Copyright 2016 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from openerp.tests.common import TransactionCase


class TestFleetSchedule(TransactionCase):

    def setUp(self, *args, **kwargs):
        super(TestFleetSchedule, self).setUp(*args, **kwargs)

        self.type3 = self.env.ref(
            "fleet_work_order.type_3")

    def test_schedule(self):
        obj_schedule = self.env[
            "fleet.work.order.type.schedule"]
        obj_order = self.env[
            "fleet.work.order"]
        self.type3.action_add_schedule()

        self.assertEqual(
            len(self.type3.schedule_ids),
            1)

        before = obj_order.search_count(
            [("type_id", "=", self.type3.id)])

        obj_schedule.run_schedule(
            self.type3.schedule_ids[0].id)

        after = obj_order.search_count(
            [("type_id", "=", self.type3.id)])

        self.assertEqual(
            after,
            before + 1)

        self.type3.schedule_ids[0].unlink()

        


{'fraction_non_alphanumeric': 0.1282051282051282, 'fraction_numerical': 0.017094017094017096, 'mean_word_length': 2.482837528604119, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4039409', 'n_tokens_mistral': 502, 'n_tokens_neox': 467, 'n_words': 90}