def test_frames_to_csv(watson): watson.start('foo', tags=['A', 'B']) watson.stop() result = frames_to_csv(watson.frames) read_csv = list(csv.reader(StringIO(result))) header = ['id', 'start', 'stop', 'project', 'tags'] assert len(read_csv) == 2 assert read_csv[0] == header assert read_csv[1][3] == 'foo' assert read_csv[1][4] == 'A, B'
def test_frames_to_csv_empty_data(watson): assert frames_to_csv(watson.frames) == ''