def testGeneratingPowerOff(self):
        simul = ReeferSimulator()
        df = simul.generatePowerOffRecords(cid="C01",
                                           nb_records=100,
                                           product_id="P02")
        self.assertIsNotNone(df)
        self.assertEqual(df.size, 1800)  # nb of rows x nbr of columns
        df2 = df.loc[df['maintenance_required'] == 1]

        for idx, content in df2.items():
            print(content)
                append = True
            elif arg == "--db":
                useDB = True
    return (cid, simulation_type, nb_records, product_id, fname, append, useDB)


if __name__ == "__main__":
    (cid, simulation_type, nb_records, product_id, fname, append,
     useDB) = parseArguments()
    if useDB:
        print(cid, simulation_type, nb_records, product_id)
    else:
        print(cid, simulation_type, nb_records, product_id, fname, append)
    simulator = ReeferSimulator()
    if simulation_type == ReeferSimulator.SIMUL_POWEROFF:
        df = simulator.generatePowerOffRecords(cid, nb_records, product_id)
    elif simulation_type == ReeferSimulator.SIMUL_CO2:
        df = simulator.generateCo2Records(cid, nb_records, product_id)
    elif simulation_type == ReeferSimulator.SIMUL_O2:
        df = simulator.generateO2Records(cid, nb_records, product_id)
    elif simulation_type == ReeferSimulator.SIMUL_TEMPERATURE:
        df = simulator.generateTemperatureRecords(cid, nb_records, product_id)
    elif simulation_type == ReeferSimulator.NORMAL:
        df = simulator.generateNormalRecords(cid, nb_records, product_id)
    else:
        print("Not a valid simulation")
        exit
    if (not useDB):
        saveFile(df, fname, append)
    else:
        saveToDB(df)