mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-16 17:55:26 -04:00
Skip invalid ownerless JSON rows (#1540)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
from scripts.claim_ownerless import claim_json_entries
|
||||
|
||||
|
||||
def test_claim_json_entries_skips_invalid_rows():
|
||||
rows = [
|
||||
{"id": "a"},
|
||||
"bad-row",
|
||||
None,
|
||||
{"id": "b", "owner": "already"},
|
||||
]
|
||||
|
||||
assert claim_json_entries(rows, "admin") == 1
|
||||
assert rows == [
|
||||
{"id": "a", "owner": "admin"},
|
||||
"bad-row",
|
||||
None,
|
||||
{"id": "b", "owner": "already"},
|
||||
]
|
||||
Reference in New Issue
Block a user