budget/tests/mocks/categories.py
Luís Murta 42d84b02f4
Removes unnecessary FK from Rules __init__
The FK are correctly initialized when the rules are created as part of
the base category/tag.
Also removes the name from the CategorySchedule, same logic applies.
2024-01-22 21:51:49 +00:00

22 lines
499 B
Python

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