def test_remove_all(self):
     song = AudioFile()
     song.add("foo", "bar")
     song.add("foo", "another")
     song.add("foo", "one more")
     song.remove("foo")
     self.assertFalse("foo" in song)
Esempio n. 2
0
 def test_remove_all(self):
     song = AudioFile()
     song.add("foo", "bar")
     song.add("foo", "another")
     song.add("foo", "one more")
     song.remove("foo")
     self.assertFalse("foo" in song)
    def test_remove(self):
        song = AudioFile()
        song.add("foo", "bar")
        song.add("foo", "another")
        song.add("foo", "one more")
        song.remove("foo", "another")
        self.failUnlessEqual(song.list("foo"), ["bar", "one more"])
        song.remove("foo", "bar")
        self.failUnlessEqual(song.list("foo"), ["one more"])
        song.remove("foo", "one more")
        self.failIf("foo" in song)

        song.add("foo", "bar")
        song.add("foo", "another")
        song.add("foo", "one more")
        song.remove("foo", "not in list")
        self.failIf("foo" in song)
Esempio n. 4
0
    def test_remove(self):
        song = AudioFile()
        song.add("foo", "bar")
        song.add("foo", "another")
        song.add("foo", "one more")
        song.remove("foo", "another")
        self.failUnlessEqual(song.list("foo"), ["bar", "one more"])
        song.remove("foo", "bar")
        self.failUnlessEqual(song.list("foo"), ["one more"])
        song.remove("foo", "one more")
        self.failIf("foo" in song)

        song.add("foo", "bar")
        song.add("foo", "another")
        song.add("foo", "one more")
        song.remove("foo", "not in list")
        self.failIf("foo" in song)
 def test_remove_empty(self):
     song = AudioFile()
     song.add("foo", u"")
     song.remove("foo", u"")
     self.assertFalse("foo" in song)
 def test_remove_unknown(self):
     song = AudioFile()
     song.add("foo", "bar")
     song.remove("foo", "not in list")
     song.remove("nope")
     self.failUnlessEqual(song.list("foo"), ["bar"])
Esempio n. 7
0
 def test_remove_empty(self):
     song = AudioFile()
     song.add("foo", u"")
     song.remove("foo", u"")
     self.assertFalse("foo" in song)
Esempio n. 8
0
 def test_remove_unknown(self):
     song = AudioFile()
     song.add("foo", "bar")
     song.remove("foo", "not in list")
     song.remove("nope")
     self.failUnlessEqual(song.list("foo"), ["bar"])