Skip to content

Commit

Permalink
Add caplog.clear() for valid schema upgrade tests
Browse files Browse the repository at this point in the history
  • Loading branch information
autoSteve committed Jan 14, 2025
1 parent aaf988b commit 44ad4c0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ def kill_undampened_cache():
assert "version from v4 to v5" in caplog.text
assert "Migrating un-dampened history" in caplog.text
verify_new_solcast_schema(data_file)
caplog.clear()

# Test upgrade from v3 schema
kill_undampened_cache()
Expand All @@ -379,13 +380,15 @@ def kill_undampened_cache():
assert "version from v1 to v5" in caplog.text
assert "Migrating un-dampened history" in caplog.text
verify_new_solcast_schema(data_file)
caplog.clear()

# Test upgrade from incompatible schema 1
kill_undampened_cache()
set_incompatible_schema1(data_file)
coordinator, solcast = await _reload(hass, entry)
assert "CRITICAL" in caplog.text
assert solcast is None
caplog.clear()

# Test upgrade from incompatible schema 2
kill_undampened_cache()
Expand Down

0 comments on commit 44ad4c0

Please sign in to comment.