Skip generated properties during store restore
Debian Trixie package bundle / packages (push) Successful in 22m24s
Debian Trixie package bundle / packages (push) Successful in 22m24s
This commit is contained in:
@@ -35,9 +35,13 @@ from bongo.storetool.Connection import connect_store
|
||||
_METADATA_PREFIX = "BONGO."
|
||||
_GENERATED_PROPERTIES = {
|
||||
"nmap.collection",
|
||||
"nmap.created",
|
||||
"nmap.flags",
|
||||
"nmap.guid",
|
||||
"nmap.index",
|
||||
"nmap.lastmodified",
|
||||
"nmap.length",
|
||||
"nmap.mail.imapuid",
|
||||
"nmap.type",
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,14 @@ class BackupArchiveTests(unittest.TestCase):
|
||||
|
||||
def test_metadata_round_trip_keeps_user_properties(self):
|
||||
metadata = _metadata(
|
||||
_Item(), {"nmap.guid": "generated", "display": "Grüße"})
|
||||
_Item(), {
|
||||
"nmap.guid": "generated",
|
||||
"nmap.created": "2026-07-23 12:00:00Z",
|
||||
"nmap.lastmodified": "2026-07-23 12:01:00Z",
|
||||
"nmap.length": "42",
|
||||
"nmap.mail.imapuid": "00000007",
|
||||
"display": "Grüße",
|
||||
})
|
||||
self.assertEqual(metadata["BONGO.imapuid"], "7")
|
||||
self.assertEqual(_properties(metadata), {"display": "Grüße"})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user