Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Griss committed Oct 14, 2023
1 parent 083135b commit 59bb03f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
test.py
.vscode
*.venv
tests/credentials.json
dist
*.egg-info
Expand Down
10 changes: 5 additions & 5 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ def test_get_battery_stats(self):
plant_ids = client.get_plant_ids()

# get the stats
stats = client.get_plant_flow(plant_ids[0])
battery_ids = client.get_battery_ids(plant_id=plant_ids[0])

battery_stats = stats['data']['flow']['nodes'][4]['deviceTips']
battery_id = stats['data']['flow']['nodes'][4]["devIds"][0]
# to enable tests on systems without batteries
if len(battery_ids) < 1:
return

self.assertIsInstance(battery_stats, dict)
self.assertIsNotNone(battery_id)
battery_id = battery_ids[0]

battery_day_stats = client.get_battery_day_stats(battery_id)

Expand Down
6 changes: 5 additions & 1 deletion tests/test_onnx.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import cv2
import os

import sys
import unittest

currentdir = os.path.dirname(__file__)
parentdir = os.path.dirname(currentdir)
sys.path.insert(0, os.path.join(parentdir, "src"))

from fusion_solar_py.captcha_solver_onnx import Solver

currentdir = os.path.dirname(__file__)
Expand Down

0 comments on commit 59bb03f

Please sign in to comment.