Add Gitea CI workflow; fix ruff lint issues
CI / test (push) Successful in 1m16s

This commit is contained in:
2026-06-28 07:44:04 -05:00
parent 129b1eff04
commit bd171d2384
10 changed files with 64 additions and 36 deletions
+3 -5
View File
@@ -8,7 +8,8 @@ The `seeded_client` fixture pre-populates:
BrandX 002 (id=3, retired)
"""
import pytest
import io
import json as _json
# ------------------------------------------------------------------ #
@@ -169,7 +170,7 @@ def test_edit_details_percentage_valid(seeded_client):
data = _json.loads(seeded_client.get("/export/all.json").data)
bat = next(b for b in data["batteries"] if b["id"] == 1)
assert bat["battery_percentage"] == 100
assert any(l["battery_id"] == 1 and l["source"] == "manual" for l in data["pct_logs"])
assert any(entry["battery_id"] == 1 and entry["source"] == "manual" for entry in data["pct_logs"])
def test_assign_battery(seeded_client):
@@ -699,9 +700,6 @@ def test_bulk_install_filters_by_size(client):
# Import
# ------------------------------------------------------------------ #
import io
import json as _json
def _make_import_payload(devices=None, batteries=None,
charge_logs=None, capacity_tests=None, pct_logs=None):