Support a distinct VAT from the participant ID in the test scenario
This commit is contained in:
1 parent
158e580be5
commit
7111131981
2 files changed
+4
-2
No files matched your search
@@ -19,12 +19,13 @@ Patch Peppol::
|
||||
>>> render = patch.object(Peppol, 'render').start()
|
||||
>>> participant_scheme, participant_id = (
|
||||
... os.getenv('PEPPYRUS_PARTICIPANT_ID').split(':', 1))
|
||||
>>> participant_vat = os.getenv('PEPPYRUS_PARTICIPANT_VAT')
|
||||
>>> with file_open('edocument_peppol_peppyrus/tests/invoice.xml', mode='r') as fp:
|
||||
... render.return_value = (
|
||||
... fp.read()
|
||||
... .replace('PARTICIPANT_SCHEME', participant_scheme)
|
||||
... .replace('PARTICIPANT_ID', participant_id)
|
||||
... .replace('PARTICIPANT_VAT', participant_id.upper())
|
||||
... .replace('PARTICIPANT_VAT', participant_vat.upper())
|
||||
... .encode())
|
||||
|
||||
Activate modules::
|
||||
|
||||
@@ -9,7 +9,8 @@ from trytond.tests.test_tryton import TEST_NETWORK, load_doc_tests
|
||||
def load_tests(*args, **kwargs):
|
||||
if (not TEST_NETWORK
|
||||
or not (os.getenv('PEPPYRUS_API_KEY')
|
||||
and os.getenv('PEPPYRUS_PARTICIPANT_ID'))):
|
||||
and os.getenv('PEPPYRUS_PARTICIPANT_ID')
|
||||
and os.getenv('PEPPYRUS_PARTICIPANT_VAT'))):
|
||||
kwargs.setdefault('skips', set()).update({
|
||||
'scenario_edocument_peppol_peppyrus.rst',
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user