validate move before migration

This commit is contained in:
jonaswinkler
2021-02-09 00:13:13 +01:00
parent d41f540a87
commit bd47582b2d
2 changed files with 8 additions and 0 deletions

View File

@@ -141,6 +141,8 @@ class TestMigrateArchiveFiles(DirectoriesMixin, TestMigrations):
archive_checksum = hashlib.md5(f.read()).hexdigest()
self.assertEqual(archive_checksum, doc.archive_checksum)
self.assertEqual(Document.objects.filter(archive_checksum__isnull=False).count(), 4)
# this will raise errors when any inconsistencies remain after migration
sanity_check()