From e25679e1805b57cbf1e86d5819fa8a4c179252ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20tom=20W=C3=B6rden?= <h.tomwoerden@indiscale.com> Date: Mon, 4 Mar 2024 11:34:59 +0100 Subject: [PATCH] FIX: adapte test to new model --- .../test_table_template_generator.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/unittests/table_json_conversion/test_table_template_generator.py b/unittests/table_json_conversion/test_table_template_generator.py index 75310253..a64ec083 100644 --- a/unittests/table_json_conversion/test_table_template_generator.py +++ b/unittests/table_json_conversion/test_table_template_generator.py @@ -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']) -- GitLab