mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-06 07:55:10 +00:00
test: delete slow, timing-based and redundant tests
This commit is contained in:
@@ -11,13 +11,13 @@ from typing import Any
|
||||
import pytest
|
||||
import responses
|
||||
|
||||
from tests.core.test_music_renderer import OWN_FACTS, OWN_ROWS, header, mixed
|
||||
from tests.core.test_music_renderer import OWN_FACTS, mixed
|
||||
from tests.remote.sessions import hold_session, session_entry
|
||||
from tests.remote.unit.test_session_reopen import SERVER, make_service
|
||||
from unshackle.core.api import handlers
|
||||
from unshackle.core.remote_service import RemoteError, RemoteService
|
||||
from unshackle.core.titles import Movie, Movies
|
||||
from unshackle.core.titles.music import MUSIC_FIELDS, Album, Music, Song
|
||||
from unshackle.core.titles.music import Album, Music, Song
|
||||
|
||||
pytestmark = pytest.mark.unit
|
||||
|
||||
@@ -72,23 +72,6 @@ def test_a_client_gets_the_facts_of_the_collection(monkeypatch: pytest.MonkeyPat
|
||||
assert [song.name for song in titles] == ["Name 1", "Name 2"]
|
||||
|
||||
|
||||
def test_the_remote_listing_is_the_local_one(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
local = mixed(**{**FACTS, "total_discs": None})
|
||||
titles = over_remote(monkeypatch, local)
|
||||
|
||||
assert header(titles) == header(local) == OWN_ROWS
|
||||
assert str(titles) == str(local) == "Own Artist - Own Title (1990)"
|
||||
|
||||
|
||||
def test_each_fact_the_constructor_takes_crosses_the_wire() -> None:
|
||||
assert set(MUSIC_FIELDS) == set(FACTS) == set(vars(Album([]))) & set(Music.__init__.__annotations__)
|
||||
|
||||
|
||||
def test_the_reply_names_only_the_facts_the_collection_has(monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
reply = titles_reply(monkeypatch, served(mixed(kind="artist", title="Own Title")))
|
||||
assert reply["collection"] == {"kind": "artist", "title": "Own Title"}
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"value", ["1990", 0, True, 12.5, float("nan"), b"1990", date(1990, 1, 2), " ", {1}, ""], ids=repr
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user