runeh / spotimeta

Python library for getting data from the Spotify metadata API

Clone this repository (size: 92.8 KB): HTTPS / SSH
$ hg clone http://bitbucket.org/runeh/spotimeta/

Changed (Δ309 bytes):

raw changeset »

tests/test_end_to_end.py (15 lines added, 0 lines removed)

Up to file-list tests/test_end_to_end.py:

@@ -105,3 +105,18 @@ def smoke_test_multi_search():
105
105
106
106
107
107
108
def test_cache_taint():
109
    cache = {}
110
    m = Metadata(cache=cache)
111
    res1 = m.search_track("Trip back to childhood")
112
113
    assert len(cache) == 1
114
115
    res2 = m.search_track("Trip back to childhood")
116
117
    assert res1 == res2
118
    assert not res1 is res2
119
120
    res2["bug"] = True
121
122
    assert not "bug" in res1