Skip to content
Snippets Groups Projects
Commit e25679e1 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

FIX: adapte test to new model

parent 0ad4e8e3
Branches
Tags
4 merge requests!100WIP: Filling XLSX: Seems to be working.,!94ENH: add framework for converting json schema into table templates,!93Filling XLSX: Everything except multiple choice.,!92ENH: xlsx template generator
Pipeline #48089 failed
......@@ -121,10 +121,8 @@ def test_generate_sheets_from_schema():
'family_name'])
assert tdef['supervisor.given_name'] == (ColumnType.SCALAR, None, ["Training", 'supervisor',
'given_name'])
assert tdef['supervisor.Organisation.name'] == (ColumnType.SCALAR, 'The name of the Record to be created', ["Training", 'supervisor',
'Organisation', 'name'])
assert tdef['supervisor.Organisation.Country'] == (ColumnType.SCALAR, None, ["Training", 'supervisor',
'Organisation', 'Country'])
assert tdef['supervisor.Organisation'] == (ColumnType.SCALAR, None, ["Training", 'supervisor',
'Organisation'])
assert tdef['duration'] == (ColumnType.SCALAR, None, ["Training", 'duration'])
assert tdef['participants'] == (ColumnType.SCALAR, None, ["Training", 'participants'])
assert tdef['subjects'] == (ColumnType.LIST, None, ["Training", 'subjects'])
......@@ -132,10 +130,8 @@ def test_generate_sheets_from_schema():
cdef = sdef['Training.coach']
assert cdef['coach.family_name'] == (ColumnType.SCALAR, None, ["Training", 'coach', 'family_name'])
assert cdef['coach.given_name'] == (ColumnType.SCALAR, None, ["Training", 'coach', 'given_name'])
assert cdef['coach.Organisation.name'] == (ColumnType.SCALAR, 'The name of the Record to be created', ["Training", 'coach',
'Organisation', 'name'])
assert cdef['coach.Organisation.Country'] == (ColumnType.SCALAR, None, ["Training", 'coach',
'Organisation', 'Country'])
assert cdef['coach.Organisation'] == (ColumnType.SCALAR, None, ["Training", 'coach',
'Organisation'])
print(cdef)
assert cdef['Training.date'] == (ColumnType.FOREIGN, "see sheet 'Training'", ["Training", 'date'])
assert cdef['Training.url'] == (ColumnType.FOREIGN, "see sheet 'Training'", ["Training", 'url'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment