
    Lrdj]                    h    d dl mZ d dlZd dlmc mZ d dlm	Z	 d dl
mZmZ d dlmZ d dlmZ d
d	ZdS )    )annotationsN)get_budget_overview)confirm_budget_plan_itemcreate_budget_plan_item_preview)connect_memory)apply_migrationsreturnNonec            	     z   t                      } t          |            |                     d                                          d         }t	          | d|dddd          }t          | |d                    t          | d          }|d	         }d}||k    }|slt          j        d
|fd||f          t          j	        |          t          j	        |          dz  }dd|iz  }t          t          j        |                    d x}x}}|d         }d}||k    }|slt          j        d
|fd||f          t          j	        |          t          j	        |          dz  }dd|iz  }t          t          j        |                    d x}x}}|d         }d}||k    }|slt          j        d
|fd||f          t          j	        |          t          j	        |          dz  }dd|iz  }t          t          j        |                    d x}x}}|d         }d}||k    }|slt          j        d
|fd||f          t          j	        |          t          j	        |          dz  }dd|iz  }t          t          j        |                    d x}x}}|d         d         d         }d}||k    }|slt          j        d
|fd||f          t          j	        |          t          j	        |          dz  }dd|iz  }t          t          j        |                    d x}x}}|d         d         d         }d}||k    }|slt          j        d
|fd||f          t          j	        |          t          j	        |          dz  }dd|iz  }t          t          j        |                    d x}x}}|d         }g }||k    }|slt          j        d
|fd||f          t          j	        |          t          j	        |          dz  }dd|iz  }t          t          j        |                    d x}x}}d S )Nz=SELECT category_id FROM budget_categories WHERE name='Wohnen'r   z2026-01zSynthetischer Wohnplanz100.00excel_seed_dry_run)
plan_monthcategory_idnamemonthly_amount_chfsource_typepayloadplanned_budget_chf)==)z%(py1)s == %(py4)s)py1py4zassert %(py6)spy6actual_expense_chfz0.00remaining_budget_chfbudget_status
no_actualsbudget_categoriesbudget_monthactual_year_to_dateuncategorized_transactions)r   r   executefetchoner   r   r   
@pytest_ar_call_reprcompare	_safereprAssertionError_format_explanation)	connr   previewoverview@py_assert0@py_assert3@py_assert2@py_format5@py_format7s	            z/home/agent/.hermes/worktrees/FinanceManager-sprint7-postfinance-portfolio-source/tests/unit/test_budget_overview_plans.pyEtest_budget_overview_includes_confirmed_budget_plan_with_zero_actualsr0   	   sO   DT,,^__hhjjklmK-d"(&+5 5  G T79#5666"433H()5X5)X5555555555)X55555)5555X555555555555555555555555555()3V3)V3333333333)V33333)3333V333333333333333333333333333*+7x7+x7777777777+x77777+7777x777777777777777777777777777O$44$4444444444$44444$4444444444444444444444444444444'(+N;GxG;xGGGGGGGGGG;xGGGGG;GGGGxGGGGGGGGGGGGGGGGGGGGGGGGGGG'(+,ABLfLBfLLLLLLLLLLBfLLLLLBLLLLfLLLLLLLLLLLLLLLLLLLLLLLLLLL017R71R77777777771R7777717777R77777777777777777777777777777    )r	   r
   )
__future__r   builtins@py_builtins_pytest.assertion.rewrite	assertionrewriter"   'jarvis_finance.services.budget_overviewr   $jarvis_finance.services.budget_plansr   r   jarvis_finance.storage.databaser   !jarvis_finance.storage.migrationsr   r0    r1   r/   <module>r=      s    " " " " " "               G G G G G G j j j j j j j j : : : : : : > > > > > >8 8 8 8 8 8r1   