Esempio n. 1
0
def test_mine_party_appt_to_csv(db_session):
    mpa = MinePartyAppointmentFactory()

    csv = MinePartyAppointment.to_csv([mpa], ['processed_by', 'processed_on'])
    second_row = str(mpa.processed_by) + ',' + str(mpa.processed_on)
    assert csv == "processed_by,processed_on\n" + second_row
Esempio n. 2
0
def test_mine_party_appt_to_csv(test_client, setup_info, auth_headers):
    record = MinePartyAppointment.query.first()
    csv = MinePartyAppointment.to_csv([record],
                                      ['processed_by', 'processed_on'])
    second_row = str(record.processed_by) + ',' + str(record.processed_on)
    assert csv == "processed_by,processed_on\n" + second_row