Skip to content

Commit

Permalink
base_business_document_import: test incoterm_match
Browse files Browse the repository at this point in the history
  • Loading branch information
bosd committed Nov 3, 2023
1 parent 07b73f1 commit e23929c
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -481,3 +481,15 @@ def test_match_account_smaller_in(self):
res = bdio._match_account({"code": "898999"}, chatter)
self.assertEqual(acc, res)
self.assertEqual(len(chatter), 1)

def test_incoterm_match(self):
bdoo = self.env["business.document.import"]
incoterm_dict = {"code": "EXW"}
res = bdoo._match_incoterm(incoterm_dict, [])
self.assertEqual(res, self.env.ref("account.incoterm_EXW"))
incoterm_dict = {"code": "EXW WORKS"}
res = bdoo._match_incoterm(incoterm_dict, [])
self.assertEqual(res, self.env.ref("account.incoterm_EXW"))
incoterm_dict = {}
res = bdoo._match_incoterm(incoterm_dict, [])
self.assertFalse(res)

0 comments on commit e23929c

Please sign in to comment.