# -*- coding: utf-8 -*-
import mock
import pytest

import pylast


def mock_network():
    return mock.Mock(
        _get_ws_auth=mock.Mock(return_value=("", "", ""))
    )


@pytest.mark.parametrize('unicode_artist', [u'\xe9lafdasfdsafdsa', u'ééééééé'])
def test_get_cache_key(unicode_artist):
    request = pylast._Request(mock_network(), 'some_method',
                              params={'artist': unicode_artist})
    request._get_cache_key()

@@ -194,22 +194,26 @@
 etrize('
-unicod
+troublesom
 e_artist
@@ -216,16 +216,21 @@
 tist', %5B
+%0A    
 u'%5Cxe9la
@@ -254,16 +254,63 @@
 %C3%A9%C3%A9%C3%A9%C3%A9%C3%A9%C3%A9%C3%A9'
+,%0A    pylast.Artist(u'B%5Cxe9l', mock_network())%0A
 %5D)%0Adef t
@@ -327,22 +327,26 @@
 che_key(
-unicod
+troublesom
 e_artist
@@ -461,14 +461,18 @@
 t': 
-unicod
+troublesom
 e_ar

Add failing test for #114