Exemplo n.º 1
0
 def test_drag_data_get(self):
     b = self.bar
     song = AudioFile()
     song["~filename"] = fsnative(u"foo")
     sel = MockSelData()
     qltk.selection_set_songs(sel, [song])
     b._drag_data_get(None, None, sel, DND_QL, None)
Exemplo n.º 2
0
    def test_selection_set_songs(self):
        song = AudioFile()
        song["~filename"] = fsnative(u"foo")
        sel = MockSelData()
        qltk.selection_set_songs(sel, [song])
        assert sel.data == fsn2bytes(fsnative(u"foo"), "utf-8")

        assert qltk.selection_get_filenames(sel) == [fsnative(u"foo")]