This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user