Skip to content

Commit d95e9da

Browse files
committed
Fix unit tests
1 parent c85e484 commit d95e9da

3 files changed

Lines changed: 2 additions & 7 deletions

File tree

python/lib/sift_py/rule/_service_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def test_rule_service_load_rules_from_yaml(rule_service):
116116
assert rule_config.expression == rule_yaml["expression"]
117117
assert rule_config.action.assignee == rule_yaml["assignee"]
118118
assert rule_config.asset_names == rule_yaml["asset_names"]
119-
assert rule_config.tag_names == rule_yaml["tag1"]
119+
assert rule_config.tag_names == rule_yaml["tag_names"]
120120
assert isinstance(rule_config.action, RuleActionCreateDataReviewAnnotation)
121121

122122

python/lib/sift_py/rule/service.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,7 @@ def _update_req_from_rule_config(
415415
else None
416416
)
417417
annotation_tags = (
418-
list_tags_impl(
419-
self._tag_service_stub,
418+
self._get_tags(
420419
names=[tag for tag in config.action.tags],
421420
tag_type=TagType.TAG_TYPE_ANNOTATION,
422421
)

python/lib/sift_py/tag/_internal/shared.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,5 @@ def get_tags_with_filter(
5959
if ids:
6060
ids_cel = cel_in("tag_id", ids)
6161
results.extend(get_tags_with_filter(tag_service_stub, ids_cel, tag_type))
62-
if not names and not ids:
63-
# If no filter, but tag_type is specified, fetch all tags of that type
64-
if tag_type is not None:
65-
results.extend(get_tags_with_filter(tag_service_stub, "", tag_type))
6662

6763
return results

0 commit comments

Comments
 (0)