satmachineadmin/tests
padreug 904b3f1d61 fix: add SQLite compatibility for Decimal types
SQLite doesn't support Decimal natively - it stores DECIMAL columns as
REAL (float). This caused sqlite3.ProgrammingError when writing Decimal
values.

Changes:
- Add prepare_for_db() helper to convert Decimal→float before writes
- Add Pydantic validators to convert float→Decimal on model creation
- Update CRUD layer tests to verify float params for SQLite
- Add SQLite round-trip tests to verify precision is preserved

The data flow is now:
Decimal (calculations) → float (prepare_for_db) → SQLite → float → Decimal (validators)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 15:09:45 +01:00
..
__init__.py feat: code quality 2024-08-13 08:20:45 +02:00
test_calculations.py refactor: use Decimal instead of float for monetary calculations 2026-01-11 14:47:56 +01:00
test_init.py Replace [mM]yextension with [sS]at[mM]achine[aA]dmin 2025-06-20 22:16:58 +02:00
test_integration.py fix: add SQLite compatibility for Decimal types 2026-01-11 15:09:45 +01:00