@@ -699,29 +699,28 @@ async def test_wifi_serial(fixture, expected, request):
699699async def test_set_current (test_charger , mock_aioclient , caplog ):
700700 """Test v4 Status reply."""
701701 await test_charger .update ()
702- value = {"msg" : "done" }
703702 mock_aioclient .post (
704- TEST_URL_CONFIG ,
703+ TEST_URL_OVERRIDE ,
705704 status = 200 ,
706- body = json . dumps ( value ) ,
705+ body = '{"msg": "OK"}' ,
707706 )
708707 with caplog .at_level (logging .DEBUG ):
709708 await test_charger .set_current (12 )
710- assert "Setting max_current_soft to 12" in caplog .text
709+ assert "Setting current limit to 12" in caplog .text
711710
712711
713712async def test_set_current_error (test_charger , mock_aioclient , caplog ):
714713 """Test v4 Status reply."""
715714 await test_charger .update ()
716715 mock_aioclient .post (
717- TEST_URL_CONFIG ,
716+ TEST_URL_OVERRIDE ,
718717 status = 200 ,
719- body = " OK" ,
718+ body = '{"msg": " OK"}' ,
720719 )
721720 with caplog .at_level (logging .DEBUG ):
722721 with pytest .raises (ValueError ):
723722 await test_charger .set_current (60 )
724- assert "Invalid value for max_current_soft : 60" in caplog .text
723+ assert "Invalid value for current limit : 60" in caplog .text
725724
726725
727726async def test_set_current_v2 (
@@ -742,9 +741,9 @@ async def test_set_current_v2(
742741 await test_charger_dev .update ()
743742 value = {"msg" : "OK" }
744743 mock_aioclient .post (
745- TEST_URL_CONFIG ,
744+ TEST_URL_OVERRIDE ,
746745 status = 200 ,
747- body = json . dumps ( value ) ,
746+ body = '{"msg": "OK"}' ,
748747 )
749748 with caplog .at_level (logging .DEBUG ):
750749 await test_charger_dev .set_current (12 )
0 commit comments