Commits

Rune Halvorsen committed cacd1c2

Added test for unicode search terms

Comments (0)

Files changed (1)

tests/test_end_to_end.py

+# -*- coding: utf-8 -*-
+
 from os.path import join
-
 from spotimeta import lookup, search_track, search_album, search_artist
 
-
 def test_album_lookup():
     res = lookup("spotify:album:6G9fHYDCoyEErUkHrFYfs4")
     album = res["result"]
     res = search_artist("The Berlin Project")
     artists = res["result"]
     assert len(artists) == min(res["total_results"], res["items_per_page"])
+
+
+def test_utf8_query():
+    res = search_artist(u"Lillebjørn Nilsen")
+    artists = res["result"]
+    assert len(artists) == 1
+    artist = artists[0]
+    assert artist["name"] == u"Lillebjørn Nilsen"