feat: add app db schema extension, for CoreUser
need a way to map Wutta User to CORE Employee for auth purposes
This commit is contained in:
parent
73192a162d
commit
4ee5aa5372
8 changed files with 187 additions and 2 deletions
16
tests/db/test_model.py
Normal file
16
tests/db/test_model.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
# -*- coding: utf-8; -*-
|
||||
|
||||
from wuttjamaican.testing import ConfigTestCase
|
||||
from wuttjamaican.db.model import User
|
||||
|
||||
from wutta_corepos.db import model as mod
|
||||
|
||||
|
||||
class TestCoreUser(ConfigTestCase):
|
||||
|
||||
def test_str(self):
|
||||
user = User(username='barney')
|
||||
self.assertEqual(str(user), 'barney')
|
||||
|
||||
ext = mod.CoreUser(user=user, corepos_employee_number=42)
|
||||
self.assertEqual(str(ext), 'barney')
|
Loading…
Add table
Add a link
Reference in a new issue