def test_serialize_song_with_chart(song): chart = models.Chart( author='foo', difficulty='Beginner', rating=3 ) chart.measures.append(models.Measure( rows=8, bpms=[(0, 240)], time=0 )) song.charts.append(chart) f = StringIO() serialize.serialize_song(song, f) assert f.getvalue() == SONG_WITH_CHART
def test_serialize_song_properties(song): f = StringIO() serialize.serialize_song(song, f) assert f.getvalue() == PROPERTIES_STR