From 3c8179a762c4387f9c40a12e3b9e560ff1c194ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0ar=C5=ABnas=20Nejus?= Date: Wed, 7 Aug 2024 11:03:29 +0100 Subject: [PATCH] Replace assertAlbumImport --- test/plugins/test_importadded.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/test/plugins/test_importadded.py b/test/plugins/test_importadded.py index 2ed1d0f4e..1b198b31d 100644 --- a/test/plugins/test_importadded.py +++ b/test/plugins/test_importadded.py @@ -68,22 +68,23 @@ class ImportAddedTest(PluginMixin, AutotagImportTestCase): "No MediaFile found for Item " + displayable_path(item.path) ) - def assertAlbumImport(self): + def test_import_album_with_added_dates(self): self.importer.run() + album = self.lib.albums().get() assert album.added == self.min_mtime for item in album.items(): assert item.added == self.min_mtime - def test_import_album_with_added_dates(self): - self.assertAlbumImport() - def test_import_album_inplace_with_added_dates(self): self.config["import"]["copy"] = False - self.config["import"]["move"] = False - self.config["import"]["link"] = False - self.config["import"]["hardlink"] = False - self.assertAlbumImport() + + self.importer.run() + + album = self.lib.albums().get() + assert album.added == self.min_mtime + for item in album.items(): + assert item.added == self.min_mtime def test_import_album_with_preserved_mtimes(self): self.config["importadded"]["preserve_mtimes"] = True