Unit test for import with video data tracks.
@@ -388,6 +388,17 @@ class MBAlbumInfoTest(_common.TestCase):
self.assertEqual(d.tracks[0].title, 'TITLE ONE')
self.assertEqual(d.tracks[1].title, 'TITLE TWO')
+ def test_skip_video_data_tracks_by_default(self):
+ tracks = [self._make_track('TITLE ONE', 'ID ONE', 100.0 * 1000.0),
+ self._make_track('TITLE TWO', 'ID TWO', 200.0 * 1000.0)]
+ data_tracks = [self._make_track('TITLE VIDEO', 'ID VIDEO',
+ 100.0 * 1000.0, False, True)]
+ release = self._make_release(tracks=tracks, data_tracks=data_tracks)
+ d = mb.album_info(release)
+ self.assertEqual(len(d.tracks), 2)
+ self.assertEqual(d.tracks[0].title, 'TITLE ONE')
+ self.assertEqual(d.tracks[1].title, 'TITLE TWO')
+
def test_no_skip_video_tracks_if_configured(self):
config['match']['ignore_video_tracks'] = False
tracks = [self._make_track('TITLE ONE', 'ID ONE', 100.0 * 1000.0),
@@ -401,6 +412,19 @@ class MBAlbumInfoTest(_common.TestCase):
self.assertEqual(d.tracks[1].title, 'TITLE VIDEO')
self.assertEqual(d.tracks[2].title, 'TITLE TWO')
+ def test_no_skip_video_data_tracks_if_configured(self):
+ config['match']['ignore_video_tracks'] = False
+ tracks = [self._make_track('TITLE ONE', 'ID ONE', 100.0 * 1000.0),
+ self._make_track('TITLE TWO', 'ID TWO', 200.0 * 1000.0)]
+ data_tracks = [self._make_track('TITLE VIDEO', 'ID VIDEO',
+ 100.0 * 1000.0, False, True)]
+ release = self._make_release(tracks=tracks, data_tracks=data_tracks)
+ d = mb.album_info(release)
+ self.assertEqual(len(d.tracks), 3)
+ self.assertEqual(d.tracks[0].title, 'TITLE ONE')
+ self.assertEqual(d.tracks[1].title, 'TITLE TWO')
+ self.assertEqual(d.tracks[2].title, 'TITLE VIDEO')
+
class ParseIDTest(_common.TestCase):
def test_parse_id_correct(self):
