test(statements): reject non-string counterpart activity without leaking TypeError
davoodmehraban89 committed
Oct 31, 2026 at 08:25 UTC
abdc474833160267b422f8759af6bc6356e6c251
1 file changed
+4
backend/tests/test_cash_flow_direct_candidate.py
+4
@@ -264,6 +264,10 @@ def test_duplicate_cash_or_counterpart_policies_rejected():
264
265
266
def test_invalid_activity_or_cash_counterpart_policy_rejected():
267
+ bad_type = counterpart_policies()
268
+ bad_type[0] = replace(bad_type[0], activity=[])
269
+ with pytest.raises(CoverageError):
270
+ build(policies=bad_type)
271
bad = counterpart_policies()
272
bad[0] = replace(bad[0], activity="CASH_TRANSFER")
273
with pytest.raises(CoverageError):