Add hub-core editable dependency, fin-specific SQLAlchemy models, and smoke tests.
21 lines
No EOL
812 B
Python
21 lines
No EOL
812 B
Python
"""Smoke tests for fin-hub model registration."""
|
|
|
|
from fin_hub.models import Budget, BurnRate, Commitment, RunwayProjection, TokenSpend
|
|
from hub_core.models.base import Base
|
|
|
|
|
|
def test_fin_models_register_on_metadata():
|
|
tables = {table.name for table in Base.metadata.sorted_tables}
|
|
assert "fin_budgets" in tables
|
|
assert "fin_commitments" in tables
|
|
assert "fin_burn_rates" in tables
|
|
assert "fin_runway_projections" in tables
|
|
assert "fin_token_spends" in tables
|
|
|
|
|
|
def test_model_classes_importable():
|
|
assert Budget.__tablename__ == "fin_budgets"
|
|
assert Commitment.__tablename__ == "fin_commitments"
|
|
assert BurnRate.__tablename__ == "fin_burn_rates"
|
|
assert RunwayProjection.__tablename__ == "fin_runway_projections"
|
|
assert TokenSpend.__tablename__ == "fin_token_spends" |