fix: Aufteilung – Final-Review-Nachträge (Monat <1000, Übrige-Mitglieder, Auth-Test, Doku) (A13)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -276,3 +276,37 @@ def test_drilldown_sonderzeichen(client, db):
|
||||
assert "kategorie=Haus+%26+Garten" in t
|
||||
r = _drill(client, kategorie="Haus & Garten")
|
||||
assert "Haus & Garten: 300,00 € / Monat" in r.text and "Rasen" in r.text
|
||||
|
||||
|
||||
def test_monat_vor_jahr_1000_vierstellig(client, db):
|
||||
_login(client)
|
||||
eink, wohnen = Category(name="Einkommen"), Category(name="Wohnen")
|
||||
db.add_all([eink, wohnen])
|
||||
db.flush()
|
||||
db.add_all([
|
||||
RecurringItem(name="Gehalt", amount=D("3000.00"), rhythm="monthly", due_day=1, category_id=eink.id),
|
||||
RecurringItem(name="Miete", amount=D("-1000.00"), rhythm="monthly", due_day=1, category_id=wohnen.id),
|
||||
])
|
||||
db.commit()
|
||||
r = _get(client, monat="0001-01")
|
||||
assert r.status_code == 200
|
||||
assert 'value="0001-01"' in r.text
|
||||
assert "01.0001" in r.text
|
||||
assert "monat=0001-01" in r.text
|
||||
|
||||
|
||||
def test_uebrige_mitglieder_in_legende_der_zweiten_torte(client, db):
|
||||
_login(client)
|
||||
eink, kat = Category(name="Einkommen"), Category(name="Vielfalt")
|
||||
db.add_all([eink, kat])
|
||||
db.flush()
|
||||
db.add(RecurringItem(name="Gehalt", amount=D("3000.00"), rhythm="monthly", due_day=1, category_id=eink.id))
|
||||
db.add(RecurringItem(name="Großposten", amount=D("-1000.00"), rhythm="monthly", due_day=1, category_id=kat.id))
|
||||
for i in range(10):
|
||||
db.add(RecurringItem(name=f"Kleinposten {i}", amount=D("-5.00"), rhythm="monthly",
|
||||
due_day=1, category_id=kat.id))
|
||||
db.commit()
|
||||
t = _drill(client, kategorie="Vielfalt").text
|
||||
legende = re.search(r'<ul class="legende">(.*?)</ul>', t, re.S).group(1)
|
||||
assert 'class="legende-zusatz"' in legende
|
||||
assert "Kleinposten 3" in legende
|
||||
|
||||
Reference in New Issue
Block a user