From 77242d6b2b83a2f413ec5186b97f17a1313079bc Mon Sep 17 00:00:00 2001 From: Zsin Skri Date: Sun, 1 Jul 2018 20:23:41 +0200 Subject: [PATCH] add test: from_scratch only removes writeable Tests for commit ba8fcdfd from_scratch import: only remove writable fields. --- test/test_importer.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/test_importer.py b/test/test_importer.py index 6721f0dc2..8d6ba425a 100644 --- a/test/test_importer.py +++ b/test/test_importer.py @@ -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