def default_product_data(): return { "id": 1, "base": base_data()[0]["id"], "category": default_product_category_data()["id"], "gender": default_product_gender_data()["id"], "name": "indigestion tablets", "size_range": default_size_range_data()["id"], "in_shop": 0, "price": 1, "created_by": default_user_data()["id"], }
def another_beneficiary_data(): return { "id": 3, "first_name": "No", "last_name": "One", "base": base_data()[0]["id"], "created_on": datetime(2022, 1, 30), "created_by": None, "family_id": 11, "seq": 1, "group_identifier": "5678", "gender": "F", }
def default_beneficiary_data(): return { "id": 1, "first_name": "Every", "last_name": "Body", "base": base_data()[0]["id"], "date_of_birth": date(1995, 5, 5), "created_on": datetime(2020, 6, 30), "created_by": None, "family_id": 10, "seq": 1, "group_identifier": "1234", "comment": "comment for fun", "gender": "M", }
def default_location_data(): return { "id": 1, "box_state": default_box_state_data()["id"], "base": base_data()[0]["id"], "is_stockroom": 0, "deleted": None, "is_donated": 0, "is_lost": 0, "is_shop": True, "is_scrap": 0, "name": "Location", "seq": 1, "visible": 1, "created_by": default_user_data()["id"], }
def relative_beneficiary_data(): # Beneficiary in the same family as #1 return { "id": 2, "first_name": "No", "last_name": "Body", "base": base_data()[0]["id"], "created_on": datetime(2021, 6, 30), "created_by": None, "family_id": 10, "family_head": 1, "seq": 2, "group_identifier": "1234", "is_volunteer": True, "not_registered": True, "deleted": datetime(2021, 12, 31), # == not active }
def another_product_data(): data = default_product_data() data["id"] = 2 data["base"] = base_data()[2]["id"] data["name"] = "new product" return data
def another_location_data(): data = default_location_data() data["id"] = 2 data["base"] = base_data()[2]["id"] return data