[IMP] Improved Unit Test Case and Fixed Travis

This commit is contained in:
Nikul Chaudhary
2017-11-10 12:48:55 +05:30
committed by Carlos Vallés Fuster
parent 97cb9aff5e
commit 5ea392345a
10 changed files with 30 additions and 24 deletions

View File

@@ -3,6 +3,7 @@
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)
from odoo.tests import common
from odoo.exceptions import ValidationError
class TestRma(common.TransactionCase):

View File

@@ -24,8 +24,9 @@ class TestRmaDropship(test_rma.TestRma):
}).create({})
res = wizard.make_supplier_rma()
supplier_rma = self.rma.browse(res['res_id'])
supplier_rma.action_rma_to_approve()
supplier_rma.action_rma_approve()
for line in supplier_rma.rma_line_ids:
line.action_rma_to_approve()
line.action_rma_approve()
wizard = self.rma_make_picking.with_context({
'active_id': 1,
'active_ids': supplier_rma.rma_line_ids.ids,
@@ -89,3 +90,7 @@ class TestRmaDropship(test_rma.TestRma):
"Wrong qty to supplier rma")
self.assertEquals(line.qty_in_supplier_rma, 2,
"Wrong qty in supplier rma")
for line in self.rma_droship_id.rma_line_ids:
line.action_rma_done()
self.assertEquals(line.state, 'done',
"Wrong State")

View File

@@ -2,7 +2,7 @@
# © 2017 Eficent Business and IT Consulting Services S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)
from odoo.addons.rma.tests import test_rma
from . import test_rma
class TestSupplierRma(test_rma.TestRma):