mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2026-11-07 13:22:26 +00:00
Add schema v3 migration and update tests
This commit is contained in:
1 parent
b3ee860fd2
commit
f2b6219dc0
4 files changed
+73
-13
No files matched your search
@@ -31,8 +31,16 @@ def test_index_export_import_round_trip():
|
||||
vault = setup_vault(tmp)
|
||||
|
||||
original = {
|
||||
"schema_version": 2,
|
||||
"entries": {"0": {"website": "example", "type": "password", "notes": ""}},
|
||||
"schema_version": 3,
|
||||
"entries": {
|
||||
"0": {
|
||||
"website": "example",
|
||||
"type": "password",
|
||||
"notes": "",
|
||||
"custom_fields": [],
|
||||
"origin": "",
|
||||
}
|
||||
},
|
||||
}
|
||||
vault.save_index(original)
|
||||
|
||||
@@ -41,9 +49,15 @@ def test_index_export_import_round_trip():
|
||||
|
||||
vault.save_index(
|
||||
{
|
||||
"schema_version": 2,
|
||||
"schema_version": 3,
|
||||
"entries": {
|
||||
"0": {"website": "changed", "type": "password", "notes": ""}
|
||||
"0": {
|
||||
"website": "changed",
|
||||
"type": "password",
|
||||
"notes": "",
|
||||
"custom_fields": [],
|
||||
"origin": "",
|
||||
}
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user