-
-
Notifications
You must be signed in to change notification settings - Fork 775
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace yml test by a python unit test
- Loading branch information
Showing
4 changed files
with
19 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2016 Daniel Reis (Camptocamp) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from . import models | ||
# © 2016 Yannick Vaucher (Camptocamp) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
from . import test_line_department |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from openerp.tests.common import TransactionCase | ||
|
||
|
||
class LineDepartmentCase(TransactionCase): | ||
|
||
def test_default_department(self): | ||
"""In a new users form, a user set only the firstname.""" | ||
aal = self.env['account.analytic.line'].sudo(self.user).new() | ||
department_id = aal.default_get(['department_id']).get('department_id') | ||
self.assertEqual(department_id, self.dep.id) | ||
|
||
def setUp(self): | ||
super(LineDepartmentCase, self).setUp() | ||
#--> hr.employee_qdp --> hr.dep_rd | ||
self.user = self.env.ref('base.user_demo') | ||
self.dep = self.env.ref('hr.dep_rd') |