mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-16 09:45:24 -04:00
Ignore invalid integration rows (#1404)
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import json
|
||||
|
||||
from src import integrations
|
||||
|
||||
|
||||
def test_load_integrations_skips_non_object_rows(tmp_path, monkeypatch):
|
||||
data_file = tmp_path / "integrations.json"
|
||||
data_file.write_text(json.dumps([{"id": "good", "name": "Good"}, "bad", None]))
|
||||
monkeypatch.setattr(integrations, "DATA_FILE", str(data_file))
|
||||
|
||||
assert integrations.load_integrations() == [{"id": "good", "name": "Good"}]
|
||||
Reference in New Issue
Block a user