Add trading journal and portfolio tracking

This commit is contained in:
kai
2026-09-09 19:01:30 +02:00
parent 1db3b008ec
commit c683bc74c0
24 changed files with 1043 additions and 8 deletions
+2 -2
View File
@@ -31,7 +31,7 @@ class PositionMigrationTests(unittest.TestCase):
initialize(path)
with connect(path) as db:
self.assertEqual(db.execute("SELECT active FROM assets WHERE name='Zinsen NG'").fetchone()[0], 0)
self.assertEqual(db.execute('SELECT COUNT(*) FROM data_migrations').fetchone()[0], 1)
self.assertEqual(db.execute('SELECT COUNT(*) FROM data_migrations WHERE name="2026-09-09-interest-positions"').fetchone()[0], 1)
self.assertEqual(db.execute("SELECT COUNT(*) FROM assets WHERE name='Anleihezinsen'").fetchone()[0], 1)
def test_fresh_database(self):
@@ -41,4 +41,4 @@ class PositionMigrationTests(unittest.TestCase):
with connect(path) as db:
self.assertEqual(db.execute("SELECT asset_type FROM assets WHERE name='Anleihezinsen'").fetchone()[0], 'bond')
self.assertEqual(db.execute("SELECT asset_type FROM assets WHERE name='Zinsen NG'").fetchone()[0], 'interest')
self.assertEqual(db.execute('PRAGMA user_version').fetchone()[0], 2)
self.assertEqual(db.execute('PRAGMA user_version').fetchone()[0], 3)