Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCloudSec committed Jan 9, 2025
1 parent 1336121 commit ba01ad2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/lib/outputs/ocsf/ocsf_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ def test_transform(self):
assert output_data.resources[0].cloud_partition == findings[0].partition
assert output_data.resources[0].region == findings[0].region
assert output_data.resources[0].data == {
"details": findings[0].resource_details
"details": findings[0].resource_details,
"metadata": {},
}
assert output_data.metadata.profiles == ["cloud", "datetime"]
assert output_data.metadata.tenant_uid == "test-organization-id"
Expand Down Expand Up @@ -191,7 +192,7 @@ def test_batch_write_data_to_file(self):
{
"cloud_partition": "aws",
"region": "eu-west-1",
"data": {"details": "resource_details"},
"data": {"details": "resource_details", "metadata": {}},
"group": {"name": "test-service"},
"labels": [],
"name": "resource_name",
Expand Down Expand Up @@ -315,7 +316,10 @@ def test_finding_output_cloud_pass_low_muted(self):
assert resource_details[0].type == finding_output.metadata.ResourceType
assert resource_details[0].cloud_partition == finding_output.partition
assert resource_details[0].region == finding_output.region
assert resource_details[0].data == {"details": finding_output.resource_details}
assert resource_details[0].data == {
"details": finding_output.resource_details,
"metadata": {},
}

resource_details_group = resource_details[0].group
assert isinstance(resource_details_group, Group)
Expand Down

0 comments on commit ba01ad2

Please sign in to comment.