def test_nonMatch(self): example = [{"artist": {"#text": "foo"}, "name": "bar"}] nowPlaying = {"artist": {"#text": "foo"}, "name": "bar"} lastfms = [example, nowPlaying] empty = spotify.lookup(lastfms) self.assertEqual(lastfms, empty)
def test_weirdChars(self): example = [{"artist": {"#text": "foo*Y#&$#Y*"}, "name": "bar@()SD()#"}] lastfms = [example, []] empty = spotify.lookup(lastfms) self.assertEqual(lastfms, empty)
def test_emptyLastfm(self): self.assertEqual([[], []], spotify.lookup([[], []]))