Replace assertAlbumImport

This commit is contained in:
Šarūnas Nejus 2024-08-07 11:03:29 +01:00
parent c6b5b3bed3
commit 3c8179a762
No known key found for this signature in database
GPG key ID: DD28F6704DBE3435

View file

@ -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