nkdsu.apps.vote.tests package

Submodules

nkdsu.apps.vote.tests.test_library_update module

class nkdsu.apps.vote.tests.test_library_update.TrackMeta(key, name, artist, album, composer, year, time, added, hex_id)

Bases: tuple

_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('key', 'name', 'artist', 'album', 'composer', 'year', 'time', 'added', 'hex_id')
classmethod _make(iterable)

Make a new TrackMeta object from a sequence or iterable

_replace(**kwds)

Return a new TrackMeta object replacing specified fields with new values

added

Alias for field number 7

album

Alias for field number 3

artist

Alias for field number 2

composer

Alias for field number 4

hex_id

Alias for field number 8

key

Alias for field number 0

name

Alias for field number 1

time

Alias for field number 6

year

Alias for field number 5

class nkdsu.apps.vote.tests.test_library_update.LibraryUpdateTest(methodName='runTest')[source]

Bases: TestCase

fixtures = ['vote.json']
get_track_xml(track: TrackMeta) str[source]
get_library_xml(tracks: Iterable[TrackMeta]) bytes[source]
library_plus_one_track(name: str, artist: str, composer: str, year: str, time: str, added: str, hex_id: str, album: str | None = None) dict[str, Any][source]
library_change_one_track(hex_id: str, new_meta: dict[str, str]) dict[str, Any][source]
_classSetupFailed = False
_class_cleanups = []
class nkdsu.apps.vote.tests.test_library_update.LibraryUpdateDryRunTest(methodName='runTest')[source]

Bases: LibraryUpdateTest

test_new_track_matching_artist() None[source]
test_new_track_non_matching_artist_and_anime() None[source]
test_new_track_almost_matching_artist() None[source]
test_new_track_artist_wrong_order() None[source]
test_new_track_artist_almost_wrong_order() None[source]
test_new_track_matching_anime() None[source]
test_new_track_almost_matching_anime() None[source]
test_new_track_almost_matching_artist_and_anime() None[source]
test_removing_track() None[source]
test_new_track_has_parsing_error() None[source]
_classSetupFailed = False
_class_cleanups = []
class nkdsu.apps.vote.tests.test_library_update.LibraryUpdateWetRunTest(methodName='runTest')[source]

Bases: LibraryUpdateTest

test_add_track() None[source]
test_change_locked_track() None[source]
_classSetupFailed = False
_class_cleanups = []
class nkdsu.apps.vote.tests.test_library_update.MetadataConsistencyCheckTest(methodName='runTest')[source]

Bases: TestCase

test_anime_and_role_required_if_inudesu_false() None[source]
test_slight_artist_mismatch() None[source]
test_multiple_artists() None[source]
test_lexer_error() None[source]
_classSetupFailed = False
_class_cleanups = []

nkdsu.apps.vote.tests.test_local_data module

class nkdsu.apps.vote.tests.test_local_data.LocalDataTest(methodName='runTest')[source]

Bases: TestCase

test_local_data_updated() None[source]
_classSetupFailed = False
_class_cleanups = []

nkdsu.apps.vote.tests.test_models module

class nkdsu.apps.vote.tests.test_models.TrackTest(methodName='runTest')[source]

Bases: TestCase

fixtures = ['vote.json']
test_tweet_only_contains_first_role() None[source]
_classSetupFailed = False
_class_cleanups = []

nkdsu.apps.vote.tests.test_parsers module

class nkdsu.apps.vote.tests.test_parsers.ArtistParserTests(methodName='runTest')[source]

Bases: TestCase

test_artist_parts() None[source]
test_group_detection() None[source]
_classSetupFailed = False
_class_cleanups = []
class nkdsu.apps.vote.tests.test_parsers.RoleParserTests(methodName='runTest')[source]

Bases: TestCase

test_role_parsing() None[source]
_classSetupFailed = False
_class_cleanups = []

nkdsu.apps.vote.tests.tests module

nkdsu.apps.vote.tests.tests.mkutc(*args, **kwargs) datetime[source]
class nkdsu.apps.vote.tests.tests.ShowTest(methodName='runTest')[source]

Bases: TestCase

Tests for Show objects. Many of these depend on Neko Desu continuing to be broadcast at 9-11pm.

setUp() None[source]
test_make_show(wipe: bool = True) None[source]
test_get_show() None[source]
test_get_show_far_in_future() None[source]
test_cannot_make_overlapping_shows() None[source]
test_calling_next_or_prev_on_only_show_returns_none() None[source]
test_showtime_date_constraint() None[source]
_classSetupFailed = False
_class_cleanups = []
class nkdsu.apps.vote.tests.tests.TrackTest(methodName='runTest')[source]

Bases: TestCase

fixtures = ['vote.json']
test_can_delete_tracks() None[source]
test_play_truncates_tweet_properly() None[source]
_classSetupFailed = False
_class_cleanups = []
class nkdsu.apps.vote.tests.tests.PlayTest(methodName='runTest')[source]

Bases: TestCase

fixtures = ['vote.json']
setUp() None[source]
test_plays_for_already_played_tracks_can_not_be_added() None[source]
test_plays_can_be_edited_after_the_fact() None[source]
_classSetupFailed = False
_class_cleanups = []