Skip to content

Commit

Permalink
[IMP] base_business_document_import: test incoterm_match
Browse files Browse the repository at this point in the history
  • Loading branch information
bosd committed Nov 1, 2023
1 parent 3da15e0 commit b063479
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,3 +297,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.assertEquals(res, self.env.ref("account.incoterm_EXW"))
incoterm_dict = {"code": "EXW WORKS"}
res = bdoo._match_incoterm(incoterm_dict, [])
self.assertEquals(res, self.env.ref("account.incoterm_EXW"))
incoterm_dict = {}
res = bdoo._match_incoterm(incoterm_dict, [])
self.assertFalse(res)

0 comments on commit b063479

Please sign in to comment.