This commit is contained in:
@@ -8,6 +8,7 @@ from trytond.modules.ncf_manager.sequence import Sequence
|
||||
from trytond.modules.ncf_manager.importer import (
|
||||
normalize_dgii_row, parse_dgii_authorizations)
|
||||
from trytond.modules.ncf_manager.invoice import Invoice
|
||||
from trytond.modules.ncf_manager.party import Party, PartyNcfType
|
||||
|
||||
|
||||
class NcfManagerUnitTestCase(unittest.TestCase):
|
||||
@@ -73,6 +74,13 @@ class NcfManagerUnitTestCase(unittest.TestCase):
|
||||
self.assertIn('template.type == product_type', source)
|
||||
self.assertIn("line.type == 'line'", source)
|
||||
|
||||
def test_party_ncf_type_is_stored_per_party_and_company(self):
|
||||
self.assertIn('ncf_types', Party._fields)
|
||||
self.assertEqual(
|
||||
Party._fields['ncf_types'].model_name, 'party.party.ncf_type')
|
||||
self.assertIn('party', PartyNcfType._fields)
|
||||
self.assertIn('company', PartyNcfType._fields)
|
||||
|
||||
def test_csv_parser_preserves_unquoted_detail(self):
|
||||
source_format, rows = parse_dgii_authorizations(
|
||||
f'{self.HEADERS}\r\n{self.ROW}\r\n'.encode())
|
||||
|
||||
Reference in New Issue
Block a user