コード例 #1
0
def generate_output():
    numeric_id = general.generate_id()
    plan = generate_internet_plan()
    internet_plan = [numeric_id, plan[0], plan[1], plan[2], plan[3], expiration_date, plan[4]]
    contract_date = fake.date_between(start_date=plan[4], end_date='now')
    expiration_date = mobile.fake.date_between(start_date=contract_date, end_date='now')
    writer.export_data(internet_plan, "output/internet_plans.csv")
コード例 #2
0
def client_output():
    numeric_id = general.generate_id()
    pesel = general.generate_pesel(fake.date_of_birth())
    contract = fake.date_between(start_date=plan[4], end_date='now')
    permanence = fake.date_between(start_date=contract, end_date='now')
    client_mobile = [numeric_id, pesel, contract, permanence]
    writer.export_data(client_mobile, "output/client_mobile.csv")
コード例 #3
0
def generate_output():
    pesel = general.generate_pesel(the_date)
    call_id = general.generate_id()
    call = generate_call(the_date)
    writer.export_data([call_id,
                        pesel,
                        "Here should be department id",
                        call[0],
                        call[1],
                        call[2],
                        call[3]], "calls.csv")
コード例 #4
0
def generate_output():
    numeric_id = general.generate_id()
    expiration_date = fake.date_between(start_date=plan[4], end_date='now')
    writer.export_data(
        [numeric_id, plan[0], plan[1], plan[2], expiration_date, plan[3]],
        "output/mobile_plans.csv")
コード例 #5
0
def generate_output():
    names = ["Sales", "Maintenance", "Support", "Anti-Cancellation"]
    name = random.choice(names)
    numeric_id = general.generate_id()
    departments = [numeric_id, name]
    writer.export_data(departments, "output/departments.csv")