3
0
Fork 0

feat: add basic support for wutta-continuum

and i mean *basic* - so far..  eventually will expose version history
for viewing etc.

unfortunately got carried away and reorganized the api docs a little
while i was at it..
This commit is contained in:
Lance Edgar 2024-08-27 21:11:44 -05:00
parent 24f5ee1dcc
commit 71728718d8
53 changed files with 308 additions and 76 deletions

View file

@ -480,6 +480,27 @@ class TestGetModelFields(TestCase):
fields = mod.get_model_fields(self.config, model.Setting)
self.assertEqual(fields, ['name', 'value'])
def test_avoid_versions(self):
model = self.app.model
mapper = MagicMock(iterate_properties = [
MagicMock(key='uuid'),
MagicMock(key='full_name'),
MagicMock(key='first_name'),
MagicMock(key='middle_name'),
MagicMock(key='last_name'),
MagicMock(key='versions'),
])
with patch.object(mod, 'sa') as sa:
sa.inspect.return_value = mapper
with patch.object(self.app, 'continuum_is_enabled', return_value=True):
fields = mod.get_model_fields(self.config, model.Person)
# nb. no versions field
self.assertEqual(set(fields), set(['uuid', 'full_name', 'first_name',
'middle_name', 'last_name']))
class TestGetCsrfToken(TestCase):