Skip to content

Commit

Permalink
update tests for SkyFi
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrike committed Sep 16, 2024
1 parent d2fa8c8 commit 7327850
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
freezegun==1.5.1
pytest==8.3.2
pytest-asyncio==0.24.0
aresponses==3.0.0
22 changes: 22 additions & 0 deletions tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,28 @@ async def test_daikinSkiFi(aresponses, client_session):
aresponses.assert_all_requests_matched()
aresponses.assert_no_unused_routes()

assert device.inside_temperature == 23.0
assert device.target_temperature == 24.0
assert device.outside_temperature == 0

assert device.represent("mode") == ('mode', 'off')

aresponses.add(
path_pattern="/ac.cgi",
method_pattern="GET",
response="opmode=0&units=.&settemp=20.0&fanspeed=3&fanflags=1&acmode=16&tonact=0&toffact=0&prog=0&time=23:36&day=6&roomtemp=23&outsidetemp=0&louvre=1&zone=0&flt=0&test=0&errdata=146&sensors=1",
)
aresponses.add(
path_pattern="/set.cgi",
method_pattern="GET",
response="opmode=1&units=.&settemp=20.0&fanspeed=3&fanflags=1&acmode=8&tonact=0&toffact=0&prog=0&time=23:36&day=6&roomtemp=23&outsidetemp=0&louvre=1&zone=0&flt=0&test=0&errdata=146&sensors=1",
)

await device.set({"mode": "cool"})
aresponses.assert_all_requests_matched()
assert device.represent("mode") == ('mode', 'cool')
assert device.target_temperature == 20.0


@pytest.mark.asyncio
async def test_daikinAirBase(aresponses, client_session):
Expand Down

0 comments on commit 7327850

Please sign in to comment.