add test: from_scratch only removes writeable

Tests for commit ba8fcdfd from_scratch import: only remove writable fields.
This commit is contained in:
Zsin Skri 2018-07-01 20:23:41 +02:00
parent ba8fcdfd47
commit 77242d6b2b

View file

@ -644,6 +644,21 @@ class ImportTest(_common.TestCase, ImportHelper):
self.importer.run()
self.assertEqual(self.lib.items().get().genre, u'')
def test_apply_from_scratch_keeps_format(self):
config['import']['from_scratch'] = True
self.importer.add_choice(importer.action.APPLY)
self.importer.run()
self.assertEqual(self.lib.items().get().format, u'MP3')
def test_apply_from_scratch_keeps_bitrate(self):
config['import']['from_scratch'] = True
bitrate = 80000
self.importer.add_choice(importer.action.APPLY)
self.importer.run()
self.assertEqual(self.lib.items().get().bitrate, bitrate)
def test_apply_with_move_deletes_import(self):
config['import']['move'] = True