@@ -142,6 +142,7 @@ def pad_schedule(schedule, target_count, reserve, fdPwr_max):
142142 schedule .append (disabled_entry .copy ())
143143 return schedule
144144
145+
145146def validate_schedule (new_schedule , reserve , fdPwr_max , target_count = 0 ):
146147 # Sort schedule by start time, closest to midnight first
147148 new_schedule = sort_schedule_by_start_time (new_schedule )
@@ -1763,6 +1764,7 @@ def set_arg(self, key, value):
17631764 state = "n/a"
17641765 print (f"Set arg { key } = { value } (state={ state } )" )
17651766
1767+
17661768async def test_write_schedule (sn , api_key , token_hash , token_expires , supabase_url , supabase_key , user_id ): # pragma: no cover
17671769 """
17681770 Write a hardcoded test schedule to the Fox API and read it back to verify
@@ -1773,7 +1775,7 @@ async def test_write_schedule(sn, api_key, token_hash, token_expires, supabase_u
17731775 os .environ ["SUPABASE_KEY" ] = supabase_key
17741776
17751777 schedule = [
1776- {' endHour' : 20 , ' fdPwr' : 7000 , ' minSocOnGrid' : 10 , ' workMode' : ' ForceDischarge' , ' fdSoc' : 10 , ' enable' : 1 , ' startHour' : 20 , ' maxSoc' : 100 , ' startMinute' : 16 , ' endMinute' : 30 }, # 20:16 - 20:30
1778+ {" endHour" : 20 , " fdPwr" : 7000 , " minSocOnGrid" : 10 , " workMode" : " ForceDischarge" , " fdSoc" : 10 , " enable" : 1 , " startHour" : 20 , " maxSoc" : 100 , " startMinute" : 16 , " endMinute" : 30 }, # 20:16 - 20:30
17771779 ]
17781780
17791781 mock_base = MockBase ()
@@ -1822,8 +1824,6 @@ async def test_write_schedule(sn, api_key, token_hash, token_expires, supabase_u
18221824 print ("WARNING: Written schedule does not match read-back schedule" )
18231825
18241826
1825-
1826-
18271827async def test_fox_api (sn , api_key , token_hash , token_expires , supabase_url , supabase_key , user_id ): # pragma: no cover
18281828 """
18291829 Run a test
0 commit comments