mirror of
https://github.com/reconurge/flowsint.git
synced 2026-05-03 18:09:52 -05:00
refactor: remove occurences of scanner
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
from flowsint_transforms.organizations.to_infos import OrgToInfosTransform
|
||||
from flowsint_types.organization import Organization
|
||||
|
||||
transform = OrgToInfosTransform("sketch_123", "scan_123")
|
||||
|
||||
|
||||
def test_preprocess_valid_names():
|
||||
data = [Organization(name="OpenAI"), {"name": "Inria"}, "OVH"]
|
||||
result = transform.preprocess(data)
|
||||
result_names = [org.name for org in result]
|
||||
|
||||
assert result_names == ["OpenAI", "Inria", "OVH"]
|
||||
|
||||
|
||||
# def test_preprocess_invalid_entries():
|
||||
# data = [
|
||||
# {"wrong_key": "value"},
|
||||
# 123,
|
||||
# None,
|
||||
# "",
|
||||
# {"name": ""},
|
||||
# ]
|
||||
# result = transform.preprocess(data)
|
||||
# assert result == []
|
||||
|
||||
|
||||
def test_execute():
|
||||
transform.execute(["Karim Terrache"])
|
||||
assert True
|
||||
Reference in New Issue
Block a user