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
No related branches found
No related tags found
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(): ...@@ -121,10 +121,8 @@ def test_generate_sheets_from_schema():
'family_name']) 'family_name'])
assert tdef['supervisor.given_name'] == (ColumnType.SCALAR, None, ["Training", 'supervisor', assert tdef['supervisor.given_name'] == (ColumnType.SCALAR, None, ["Training", 'supervisor',
'given_name']) 'given_name'])
assert tdef['supervisor.Organisation.name'] == (ColumnType.SCALAR, 'The name of the Record to be created', ["Training", 'supervisor', assert tdef['supervisor.Organisation'] == (ColumnType.SCALAR, None, ["Training", 'supervisor',
'Organisation', 'name']) 'Organisation'])
assert tdef['supervisor.Organisation.Country'] == (ColumnType.SCALAR, None, ["Training", 'supervisor',
'Organisation', 'Country'])
assert tdef['duration'] == (ColumnType.SCALAR, None, ["Training", 'duration']) assert tdef['duration'] == (ColumnType.SCALAR, None, ["Training", 'duration'])
assert tdef['participants'] == (ColumnType.SCALAR, None, ["Training", 'participants']) assert tdef['participants'] == (ColumnType.SCALAR, None, ["Training", 'participants'])
assert tdef['subjects'] == (ColumnType.LIST, None, ["Training", 'subjects']) assert tdef['subjects'] == (ColumnType.LIST, None, ["Training", 'subjects'])
...@@ -132,10 +130,8 @@ def test_generate_sheets_from_schema(): ...@@ -132,10 +130,8 @@ def test_generate_sheets_from_schema():
cdef = sdef['Training.coach'] cdef = sdef['Training.coach']
assert cdef['coach.family_name'] == (ColumnType.SCALAR, None, ["Training", 'coach', 'family_name']) 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.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', assert cdef['coach.Organisation'] == (ColumnType.SCALAR, None, ["Training", 'coach',
'Organisation', 'name']) 'Organisation'])
assert cdef['coach.Organisation.Country'] == (ColumnType.SCALAR, None, ["Training", 'coach',
'Organisation', 'Country'])
print(cdef) print(cdef)
assert cdef['Training.date'] == (ColumnType.FOREIGN, "see sheet 'Training'", ["Training", 'date']) assert cdef['Training.date'] == (ColumnType.FOREIGN, "see sheet 'Training'", ["Training", 'date'])
assert cdef['Training.url'] == (ColumnType.FOREIGN, "see sheet 'Training'", ["Training", 'url']) 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.
Finish editing this message first!
Please register or to comment