Skip to content

Commit

Permalink
Linting of unit tests ...
Browse files Browse the repository at this point in the history
  • Loading branch information
wagmarcel committed Dec 17, 2024
1 parent 3c8aad6 commit 99a4eed
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

from unittest.mock import patch, mock_open
import os
import sys
import create_sql_checks_from_shacl
from create_sql_checks_from_shacl import parse_args

Expand Down Expand Up @@ -56,9 +55,9 @@ def test_parse_args_minimal():
"path/to/knowledge.ttl"
]
parsed_args = parse_args(test_args)

assert parsed_args.shaclfile == "path/to/shacl.ttl"
assert parsed_args.knowledgefile == "path/to/knowledge.ttl"
assert parsed_args.context is None
assert parsed_args.namespace == "iff"
assert parsed_args.enable_checkpointing is False
assert parsed_args.enable_checkpointing is False
Original file line number Diff line number Diff line change
Expand Up @@ -666,8 +666,10 @@ def test_process_ngsild_spo_hasObject(mock_isentity, mock_create_table_name, moc
assert local_ctx['bounds'] == {'this': 'THISTABLE.id', 'c': 'CUTTER.id', 'f': 'FTABLE.`id`'}
assert local_ctx['bgp_sql_expression'] == [
{'statement': 'attributes_view AS CHAS_FILTERTABLE', 'join_condition': "CHAS_FILTERTABLE.name = \
'https://industry-fusion.com/types/v0.9/hasFilter' and CHAS_FILTERTABLE.entityId = CTABLE.id and IFNULL(CHAS_FILTERTABLE.`deleted`, FALSE) IS FALSE"},
{'statement': 'entities_view AS FTABLE', 'join_condition': "FTABLE.id = CHAS_FILTERTABLE.`attributeValue` and CHAS_FILTERTABLE.type = \
'https://industry-fusion.com/types/v0.9/hasFilter' and CHAS_FILTERTABLE.entityId = CTABLE.id and \
IFNULL(CHAS_FILTERTABLE.`deleted`, FALSE) IS FALSE"},
{'statement': 'entities_view AS FTABLE', 'join_condition': "FTABLE.id = \
CHAS_FILTERTABLE.`attributeValue` and CHAS_FILTERTABLE.type = \
'https://uri.etsi.org/ngsi-ld/Relationship' and IFNULL(FTABLE.`deleted`, FALSE) IS FALSE"}]


Expand Down Expand Up @@ -718,8 +720,8 @@ def test_process_ngsild_spo_obj_defined(mock_isentity, mock_create_table_name, m
assert local_ctx['bgp_tables'] == {'FHAS_FILTERTABLE': [], 'FTABLE': []}
assert local_ctx['bounds'] == {'this': 'THISTABLE.id', 'f': 'FTABLE.id'}
assert local_ctx['bgp_sql_expression'] == [
{'statement': 'attributes_view AS FHAS_FILTERTABLE', 'join_condition': \
"FHAS_FILTERTABLE.`attributeValue` \
{'statement': 'attributes_view AS FHAS_FILTERTABLE', 'join_condition':
"FHAS_FILTERTABLE.`attributeValue` \
= FTABLE.id and FHAS_FILTERTABLE.type = 'https://uri.etsi.org/ngsi-ld/Relationship' and \
IFNULL(FHAS_FILTERTABLE.`deleted`, FALSE) IS FALSE"},
{'statement': 'entities_view AS FTABLE', 'join_condition': "FHAS_FILTERTABLE.name = \
Expand Down
1 change: 0 additions & 1 deletion semantic-model/shacl2flink/tests/test_lib_sparql_to_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ def test_wrap_sql_construct(attribute_column_mock, get_bound_trim_string_mock):
\nFROM target_sql WHERE where"



@patch('lib.sparql_to_sql.translate')
@patch('lib.sparql_to_sql.wrap_sql_construct')
@patch('lib.sparql_to_sql.bgp_translation_utils.merge_vartypes')
Expand Down

0 comments on commit 99a4eed

Please sign in to comment.