test_rtutil: Simplify setup.

This commit is contained in:
Brett Smith 2020-04-28 17:20:59 -04:00
parent bd0d607032
commit 46ac91e86e

View file

@ -209,7 +209,7 @@ def test_results_not_found_only_in_transient_cache(new_client):
assert not rt1.exists(9) assert not rt1.exists(9)
assert rt2.exists(9) assert rt2.exists(9)
def test_txn_with_urls(new_client): def test_txn_with_urls(rt):
txn_meta = { txn_meta = {
'rt-id': 'rt:1', 'rt-id': 'rt:1',
'contract': 'RepoLink.pdf', 'contract': 'RepoLink.pdf',
@ -219,7 +219,6 @@ def test_txn_with_urls(new_client):
('Income:Donations', -10, {'receipt': 'rt:2/13 donation.txt'}), ('Income:Donations', -10, {'receipt': 'rt:2/13 donation.txt'}),
('Assets:Cash', 10, {'receipt': 'cash.png rt:2/14'}), ('Assets:Cash', 10, {'receipt': 'cash.png rt:2/14'}),
]) ])
rt = rtutil.RT(new_client)
actual = rt.txn_with_urls(txn) actual = rt.txn_with_urls(txn)
def check(source, key, ticket_id, attachment_id=None): def check(source, key, ticket_id, attachment_id=None):
url_path = EXPECTED_URLS_MAP[(ticket_id, attachment_id)] url_path = EXPECTED_URLS_MAP[(ticket_id, attachment_id)]