diff --git a/conservancy_beancount/reports/accrual.py b/conservancy_beancount/reports/accrual.py index b0bb982..5438383 100644 --- a/conservancy_beancount/reports/accrual.py +++ b/conservancy_beancount/reports/accrual.py @@ -230,7 +230,7 @@ def outgoing_report(groups: PostGroups, contract_links = related.all_meta_links('contract') if contract_links: contract_s = ' , '.join(rt_wrapper.iter_urls( - contract_links, '<{}>', '{}', '', + contract_links, missing_fmt='', )) else: contract_s = "NO CONTRACT GOVERNS THIS TRANSACTION" @@ -254,7 +254,7 @@ def outgoing_report(groups: PostGroups, txn = post.meta.txn if txn is not last_txn: last_txn = txn - txn = rt_wrapper.txn_with_urls(txn) + txn = rt_wrapper.txn_with_urls(txn, '{}') bc_printer.print_entry(txn, file=out_file) def filter_search(postings: Iterable[data.Posting], diff --git a/setup.py b/setup.py index 73df53a..2c6a8de 100755 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ from setuptools import setup setup( name='conservancy_beancount', description="Plugin, library, and reports for reading Conservancy's books", - version='1.0.4', + version='1.0.5', author='Software Freedom Conservancy', author_email='info@sfconservancy.org', license='GNU AGPLv3+', diff --git a/tests/test_reports_accrual.py b/tests/test_reports_accrual.py index 0586a90..5fa0aba 100644 --- a/tests/test_reports_accrual.py +++ b/tests/test_reports_accrual.py @@ -305,8 +305,9 @@ def test_outgoing_report(accrual_postings): accrual.outgoing_report({invoice: related}, output, errors, rt_client, rt_cache) assert not errors.getvalue() rt_url = rt_client.DEFAULT_URL[:-9] - rt_id_url = re.escape(f'<{rt_url}Ticket/Display.html?id=510>') - contract_url = re.escape(f'<{rt_url}Ticket/Attachment/4000/4000/contract.pdf>') + rt_id_url = rf'\b{re.escape(f"{rt_url}Ticket/Display.html?id=510")}\b' + contract_url = rf'\b{re.escape(f"{rt_url}Ticket/Attachment/4000/4000/contract.pdf")}\b' + print(output.getvalue()) check_output(output, [ r'^PAYMENT FOR APPROVAL:$', r'^REQUESTOR: Mx\. 510 $', @@ -338,9 +339,6 @@ def test_outgoing_report_custom_field_fallbacks(accrual_postings): rt_cache = rtutil.RT(rt_client) accrual.outgoing_report({invoice: related}, output, errors, rt_client, rt_cache) assert not errors.getvalue() - rt_url = rt_client.DEFAULT_URL[:-9] - rt_id_url = re.escape(f'<{rt_url}Ticket/Display.html?id=510>') - contract_url = re.escape(f'<{rt_url}Ticket/Attachment/4000/4000/contract.pdf>') check_output(output, [ r'^PAYMENT FOR APPROVAL:$', r'^REQUESTOR: $',