mirror of
https://github.com/beetbox/beets.git
synced 2026-01-03 06:22:48 +01:00
Add test_reimported_album_not_preserves_flexattr
Checks if a reimported album flexible attribute "data_source" will be updated correctly from the match being applied.
This commit is contained in:
parent
42aa989e2d
commit
efc88193f9
1 changed files with 9 additions and 1 deletions
|
|
@ -139,7 +139,8 @@ class AutotagStub:
|
|||
va=False,
|
||||
album_id='albumid' + id,
|
||||
artist_id='artistid' + id,
|
||||
albumtype='soundtrack'
|
||||
albumtype='soundtrack',
|
||||
data_source='match_source'
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -1723,6 +1724,7 @@ class ReimportTest(unittest.TestCase, ImportHelper, _common.Assertions):
|
|||
album = self.add_album_fixture()
|
||||
album.added = 4242.0
|
||||
album.foo = 'bar' # Some flexible attribute.
|
||||
album.data_source = 'original_source'
|
||||
album.store()
|
||||
item = album.items().get()
|
||||
item.baz = 'qux'
|
||||
|
|
@ -1804,6 +1806,12 @@ class ReimportTest(unittest.TestCase, ImportHelper, _common.Assertions):
|
|||
if new_artpath != old_artpath:
|
||||
self.assertNotExists(old_artpath)
|
||||
|
||||
def test_reimported_album_not_preserves_flexattr(self):
|
||||
self._setup_session()
|
||||
self.assertEqual(self._album().data_source, 'original_source')
|
||||
self.importer.run()
|
||||
self.assertEqual(self._album().data_source, 'match_source')
|
||||
|
||||
|
||||
class ImportPretendTest(_common.TestCase, ImportHelper):
|
||||
""" Test the pretend commandline option
|
||||
|
|
|
|||
Loading…
Reference in a new issue