예제 #1
0
def test_get_album_year():
    """Return MP4 track year."""
    mp4 = Track.get_details(m4a_file_path)
    assert 2015 == mp4.get_album_year()
예제 #2
0
def test_get_track_genre():
    """Return MP4 track genre."""
    mp4 = Track.get_details(m4a_file_path)
    assert ['Electronic'] == mp4.get_track_genre()
예제 #3
0
def test_mp3_get_title():
    mp3 = Track.get_details(mp3_file_path)
    assert 'LadyKilla Feat. Cocc Pistol Cree' == mp3.get_title()
예제 #4
0
def test_get_album_artists():
    """Return MP4 track album artists."""
    mp4 = Track.get_details(m4a_file_path)
    assert ['Amon Tobin'] == mp4.get_album_artists()
예제 #5
0
def test_get_track_genre():
    mp3 = Track.get_details(mp3_file_path)
    assert ['Hip-Hop'] == mp3.get_track_genre()
예제 #6
0
def test_get_track_publisher():
    mp3 = Track.get_details(mp3_file_path)
    assert ['HotNewHipHop.com'] == mp3.get_track_publisher()
예제 #7
0
def test_get_track_album():
    mp3 = Track.get_details(mp3_file_path)
    assert 'Ketchup' == mp3.get_track_album()
예제 #8
0
def test_factory_returns_m4a_class():
    m4a = Track.get_details('Amon Tobin/Dark Jovian/01 Dark Jovian.m4a')
    assert isinstance(m4a, M4a)
예제 #9
0
def test_mp3_get_album_artists():
    mp3 = Track.get_details(mp3_file_path)
    assert 'DJ Mustard' == mp3.get_album_artists()
예제 #10
0
def test_mp3_get_album_year():
    mp3 = Track.get_details(mp3_file_path_with_year)
    assert 1972 == mp3.get_album_year()
예제 #11
0
def test_factory_returns_mp3_class():
    mp3_file_path = 'DJ Mustard/Ketchup - HotNewHipHop/08. DJ Mustard - LadyKilla Feat. Coc' +\
                    'c Pistol Cree.mp3'
    mp3 = Track.get_details(mp3_file_path)
    assert isinstance(mp3, Mp3)
예제 #12
0
def test_error_if_filetype_not_supported():
    with pytest.raises(Exception):
        Track.get_details('test.abc')
예제 #13
0
def test_factory_returns_mp4_class():
    mp4 = Track.get_details('Amon Tobin/Dark Jovian/01 Dark Jovian.m4a')
    assert isinstance(mp4, Mp4)
예제 #14
0
def test_get_track_copyright():
    """Return MP4 track copyright."""
    mp4 = Track.get_details(m4a_file_path)
    assert mp4.get_track_copyright() is None
예제 #15
0
def test_get_track_number():
    mp3 = Track.get_details(mp3_file_path)
    assert 8 == mp3.get_track_number()
예제 #16
0
def test_get_title():
    """Return MP4 track title."""
    mp4 = Track.get_details(m4a_file_path)
    assert ['Dark Jovian'] == mp4.get_title()
예제 #17
0
def test_factory_returns_flac_class():
    flac = Track.get_details('test.flac')
    assert isinstance(flac, Flac)