3
0
Fork 0

feat: add basic data model support

wuttjamaican will provide a default data model with minimal tables;
it's assumed each custom app will extend this model with other tables
This commit is contained in:
Lance Edgar 2024-07-11 12:55:55 -05:00
parent 7012409e1e
commit 375d0be638
19 changed files with 388 additions and 13 deletions

View file

View file

@ -0,0 +1,25 @@
# -*- coding: utf-8; -*-
from unittest import TestCase
try:
import sqlalchemy as sa
from wuttjamaican.db.model import base as model
except ImportError:
pass
else:
class TestUUIDColumn(TestCase):
def test_basic(self):
column = model.uuid_column()
self.assertIsInstance(column, sa.Column)
class TestSetting(TestCase):
def test_basic(self):
setting = model.Setting()
self.assertEqual(str(setting), "")
setting.name = 'foo'
self.assertEqual(str(setting), "foo")