tests.test_search   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 11
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A test_search() 0 9 2
1
import pytest
0 ignored issues
show
introduced by
Missing module docstring
Loading history...
2
from univk_audio import AsyncVKMusic
3
4
5
@pytest.mark.asyncio
6
async def test_search():
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
7
    cookies = "id=816380914; first_name=Shantel; " \
8
    "photo_50=https%3A%2F%2Fvk.com%2Fimages%2Fcamera_50.png"
9
    async with AsyncVKMusic(cookies=cookies) as music:
10
        search_results = await music.search(query="Imagine Dragons - Bones")
11
        title, download_link = next(iter(search_results.items()))
12
        assert title == "Imagine Dragons - Bones"
13
        assert "download.php" in download_link
14