budget/tests/mocks/categories.py
Luís Murta 271130b107
[DB] Rules collection using list instead of set
There pains of using a set as the aggregation of rules overweight the
small advantage. While it would make detecting similar rules faster, the
use of a collection type not inherently supporting by JSON brings some
issues in the serialization.
2024-01-22 21:47:47 +00:00

13 lines
327 B
Python

from decimal import Decimal
from pfbudget.db.model import Category, CategoryRule, Tag, TagRule
category_null = Category("null")
category1 = Category(
"cat#1",
rules=[CategoryRule("cat#1", description="desc#1", max=Decimal(0))],
)
tag_1 = Tag("tag#1", rules=[TagRule("tag#1", description="desc#1", max=Decimal(0))])