def test_get_download_types_single_trailer_one_trailer(): type_list = [u'Trailer'] download_types = trailers.get_download_types( 'single_trailer', type_list, ) assert download_types == type_list
def test_get_download_types_single_trailer_no_trailers(): type_list = [u'', u'Clip', u'Sneak Peek'] download_types = trailers.get_download_types( 'SINGLE_TRAILER', type_list, ) expected_types = [] assert download_types == expected_types
def test_get_download_types_single_trailer_only_trailer_2(): type_list = [u'Trailer 2'] download_types = trailers.get_download_types( 'single_trailer', type_list, ) expected_types = [u'Trailer 2'] assert download_types == expected_types
def test_get_download_types_all(): video_types = [ '', u'The Making of Safe and Sound', u'Trailer', u'Trailer ' ] download_types = trailers.get_download_types( 'all', video_types, ) expected_types = [u'The Making of Safe and Sound', u'Trailer'] assert download_types == expected_types
def test_get_download_types_trailers(): type_list = [ u'Trailer 2', u'Clip', u'Teaser', u'Sneak Peek', u'Trailer', u'Teaser 2', u'First Look', u'The Making of Safe and Sound' ] download_types = trailers.get_download_types( 'tRaiLers', type_list, ) expected_types = [ u'First Look', u'Teaser', u'Teaser 2', u'Trailer', u'Trailer 2' ] assert download_types == expected_types