services are checked

This commit is contained in:
2024-11-08 17:14:02 +03:00
parent a5b1e0b2f4
commit c5b771e5cb
82 changed files with 1720 additions and 869 deletions

View File

@@ -3,16 +3,18 @@ from test_application.evyos.datas.get_occupants_codes import get_occupants_types
from test_application.evyos.datas.get_type_codes import get_type_codes_key_and_class
decision_book_items_dict = lambda token, item_comment, info_type_uu_id, unit_price, is_fixed, st, ed: {
"token": token,
"item_comment": f"Test {item_comment}",
"info_type_uu_id": info_type_uu_id,
"unit_price": unit_price,
"unit_price_is_fixed": is_fixed,
"debit_start_date": st,
"debit_end_date": ed,
**active_and_confirmed,
}
decision_book_items_dict = (
lambda token, item_comment, info_type_uu_id, unit_price, is_fixed, st, ed: {
"token": token,
"item_comment": f"Test {item_comment}",
"info_type_uu_id": info_type_uu_id,
"unit_price": unit_price,
"unit_price_is_fixed": is_fixed,
"debit_start_date": st,
"debit_end_date": ed,
**active_and_confirmed,
}
)
def create_decision_book_items(decision_book_items):
@@ -70,8 +72,12 @@ def collect_invitation_to_building_residents(
def create_decision_book_items_with_occupant_user(
writers_token: str, unit_price: float, is_fixed: bool, info_type_uu_id: str,
start_date: str = None, end_date: str = None
writers_token: str,
unit_price: float,
is_fixed: bool,
info_type_uu_id: str,
start_date: str = None,
end_date: str = None,
):
print("create_decision_book_items_with_occupant_user : ", writers_token)
list_of_items = [
@@ -82,7 +88,7 @@ def create_decision_book_items_with_occupant_user(
unit_price=unit_price,
is_fixed=is_fixed,
st=start_date,
ed=end_date
ed=end_date,
),
]
for item in list_of_items:
@@ -92,14 +98,21 @@ def create_decision_book_items_with_occupant_user(
def run_decision_book_items(
writers_token, unit_price, info_type_uu_id, is_fixed, start_date=None, end_date=None
writers_token, unit_price, info_type_uu_id, is_fixed, start_date=None, end_date=None
):
if start_date and end_date:
create_decision_book_items_with_occupant_user(
writers_token=writers_token, unit_price=unit_price, is_fixed=is_fixed, info_type_uu_id=info_type_uu_id,
start_date=start_date, end_date=end_date
writers_token=writers_token,
unit_price=unit_price,
is_fixed=is_fixed,
info_type_uu_id=info_type_uu_id,
start_date=start_date,
end_date=end_date,
)
else:
create_decision_book_items_with_occupant_user(
writers_token=writers_token, unit_price=unit_price, is_fixed=is_fixed, info_type_uu_id=info_type_uu_id,
writers_token=writers_token,
unit_price=unit_price,
is_fixed=is_fixed,
info_type_uu_id=info_type_uu_id,
)