Skip to content

Commit

Permalink
fixed tests and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
wagmarcel committed Sep 27, 2024
1 parent 79cd5c2 commit 7de540d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion semantic-model/shacl2flink/lib/shacl_properties_to_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
THEN '{{severity}}'
ELSE 'ok' END AS severity,
'customer' customer,
CASE
CASE
WHEN typ IS NOT NULL AND attr_typ IS NOT NULL AND NOT (SQL_DIALECT_CAST(val as DOUBLE) {{ operator }} {{ comparison_value }})
THEN 'Model validation for Property {{property_path}} failed for ' || this || '. Value ' || IFNULL(val, 'NULL') || ' is not {{ operator }} {{ comparison_value }}.'
ELSE 'All ok' END as `text`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ def test_lib_shacl_prroperties_to_sql(mock_utils, mock_configs, mock_yaml,
mock_graph):
def identity(klass):
return klass
def identity2(klass, param):
return klass
mock_utils.strip_class = identity
mock_utils.class_to_obj_name = identity
mock_utils.camelcase_to_snake_case = identity
mock_utils.process_sql_dialect = identity2
mock_configs.attributes_table_obj_name = 'attributes'
mock_configs.rdf_table_obj_name = 'rdf'
mock_configs.attributes_view_obj_name = 'attributes-view'
Expand Down

0 comments on commit 7de540d

Please sign in to comment.