mirror of
https://github.com/yweber/lodel2.git
synced 2026-08-02 02:18:37 +02:00
More tests on LeObject
This commit is contained in:
parent
7f2246756d
commit
0b60023145
4 changed files with 12 additions and 4 deletions
|
|
@ -106,6 +106,8 @@ person.new_field( 'alias',
|
|||
},
|
||||
data_handler = 'set',
|
||||
allowed_classes = [person],
|
||||
default = None,
|
||||
nullable = True,
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -272,7 +274,9 @@ person.new_field( 'linked_texts',
|
|||
data_handler = 'list',
|
||||
back_reference = ('Text', 'linked_persons'),
|
||||
group = editorial_person_group,
|
||||
allowed_classes = [text])
|
||||
allowed_classes = [text],
|
||||
default = None,
|
||||
nullable = True)
|
||||
|
||||
text.new_field( 'linked_persons',
|
||||
display_name = {
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -55,9 +55,13 @@ class LeFilteredQueryTestCase(unittest.TestCase):
|
|||
def test_insert(self):
|
||||
dyncode.Person.insert({'lastname': 'foo', 'firstname': 'bar'})
|
||||
|
||||
@unittest.skip("wait")
|
||||
def test_bad_insert(self):
|
||||
""" Insert with bad arguments """
|
||||
dyncode.Person.insert({})
|
||||
dyncode.Person.insert({'lodel_id': 1,'lastname': 'foo', 'firstname': 'bar'})
|
||||
badargs = [
|
||||
{},
|
||||
{'lodel_id': 1,'lastname': 'foo', 'firstname': 'bar'}]
|
||||
|
||||
for arg in badargs:
|
||||
with self.assertRaises(LeApiDataCheckErrors):
|
||||
dyncode.Person.insert(arg)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue