Skip to content

Commit 4bf5ba1

Browse files
committed
test: improve robustness of test revenue account lookup
1 parent d399a4f commit 4bf5ba1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/conftest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,11 @@ def test_revenue_account_obj() -> Account:
332332
(acct for acct in _cached_test_accounts if acct.name == 'Test Revenue'),
333333
None,
334334
)
335+
if account is None:
336+
account = next(
337+
(acct for acct in _cached_test_accounts if 'test revenue' in acct.name.lower()),
338+
None,
339+
)
335340
if account is None:
336341
raise RuntimeError('Test Revenue account not found in cached test accounts.')
337342
return account

0 commit comments

Comments
 (0)