M8-T03: adopt DSMR history into meter sources
This commit is contained in:
@@ -139,7 +139,9 @@ def test_populated_revision_14_upgrades_to_meter_source_head_with_audit(tmp_path
|
||||
finally:
|
||||
engine.dispose()
|
||||
|
||||
command.upgrade(config, "head")
|
||||
# This T01 fixture intentionally audits the schema-only revision 15.
|
||||
# Revision 16 has its own DSMR-history adoption fixture.
|
||||
command.upgrade(config, "20260822_15_meter_sources")
|
||||
|
||||
engine = _engine_with_foreign_keys(database_url)
|
||||
try:
|
||||
@@ -187,7 +189,7 @@ def test_populated_revision_14_upgrades_to_meter_source_head_with_audit(tmp_path
|
||||
assert cost_fks["contract_version_id"]["referred_table"] == "energy_contract_version"
|
||||
assert cost_fks["source_binding_id"]["referred_table"] == "meter_source_binding"
|
||||
|
||||
command.upgrade(config, "head")
|
||||
command.upgrade(config, "20260822_15_meter_sources")
|
||||
assert {
|
||||
table_name: engine.connect().execute(text(f"SELECT COUNT(*) FROM {table_name}")).scalar_one()
|
||||
for table_name in before_counts
|
||||
|
||||
Reference in New Issue
Block a user