Skip to content

Commit

Permalink
[client] Fix incidents tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelHassine committed Nov 7, 2023
1 parent af65c54 commit 5929ffa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pycti/utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
from enum import Enum

from stix2 import CustomObject, CustomObservable
from stix2 import CustomObject, CustomObservable, ExternalReference
from stix2.properties import (
ListProperty,
ReferenceProperty,
Expand Down Expand Up @@ -150,6 +150,7 @@ def has_value(cls, value):
("response_types", ListProperty(StringProperty)),
("x_opencti_workflow_id", StringProperty()),
("x_opencti_assignee_ids", ListProperty(StringProperty)),
("external_references", ListProperty(ExternalReference)),
(
"object_refs",
ListProperty(
Expand All @@ -175,6 +176,7 @@ class CustomObjectCaseIncident:
("information_types", ListProperty(StringProperty)),
("x_opencti_workflow_id", StringProperty()),
("x_opencti_assignee_ids", ListProperty(StringProperty)),
("external_references", ListProperty(ExternalReference)),
(
"object_refs",
ListProperty(
Expand Down
2 changes: 2 additions & 0 deletions tests/cases/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ def data(self) -> Dict:
"description": "Incident by Green Group against a targets in the financial services sector.",
"aliases": ["GREENEVIL", "GREVIL"],
"confidence": 60,
"created": get_incident_start_date(),
"first_seen": get_incident_start_date(),
"last_seen": get_incident_end_date(),
"objective": "World dominance",
Expand Down Expand Up @@ -682,6 +683,7 @@ class StixCoreRelationshipTest(EntityTest):
def setup(self):
self.incident = self.api_client.incident.create(
name="My new incident",
created=get_incident_start_date(),
description="We have been compromised",
objective="Espionage",
)
Expand Down

0 comments on commit 5929ffa

Please sign in to comment.