Don't encode strings as 'utf-8' twice in _get_cache_key. Closes #109.
This commit is contained in:
parent
387220c1d6
commit
c2b03afe55
2 changed files with 18 additions and 1 deletions
17
tests/request_test.py
Normal file
17
tests/request_test.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
# -*- 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()
|
Loading…
Add table
Add a link
Reference in a new issue