Format with Black 18.6b1
This commit is contained in:
parent
e5a5278d51
commit
da9465c100
13 changed files with 458 additions and 414 deletions
|
@ -7,23 +7,24 @@ import pylast
|
|||
|
||||
|
||||
def mock_network():
|
||||
return mock.Mock(
|
||||
_get_ws_auth=mock.Mock(return_value=("", "", ""))
|
||||
)
|
||||
return mock.Mock(_get_ws_auth=mock.Mock(return_value=("", "", "")))
|
||||
|
||||
|
||||
@pytest.mark.parametrize('artist', [
|
||||
u'\xe9lafdasfdsafdsa', u'ééééééé',
|
||||
pylast.Artist(u'B\xe9l', mock_network()),
|
||||
'fdasfdsafsaf not unicode',
|
||||
])
|
||||
@pytest.mark.parametrize(
|
||||
"artist",
|
||||
[
|
||||
u"\xe9lafdasfdsafdsa",
|
||||
u"ééééééé",
|
||||
pylast.Artist(u"B\xe9l", mock_network()),
|
||||
"fdasfdsafsaf not unicode",
|
||||
],
|
||||
)
|
||||
def test_get_cache_key(artist):
|
||||
request = pylast._Request(mock_network(), 'some_method',
|
||||
params={'artist': artist})
|
||||
request = pylast._Request(mock_network(), "some_method", params={"artist": artist})
|
||||
request._get_cache_key()
|
||||
|
||||
|
||||
@pytest.mark.parametrize('obj', [pylast.Artist(u'B\xe9l', mock_network())])
|
||||
@pytest.mark.parametrize("obj", [pylast.Artist(u"B\xe9l", mock_network())])
|
||||
def test_cast_and_hash(obj):
|
||||
assert type(six.text_type(obj)) is six.text_type
|
||||
assert isinstance(hash(obj), int)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue