Update yeti.py

add test
pull/488/head
Sebdraven 2021-03-19 12:24:15 +01:00
parent bc1bea0ec4
commit 28b554d975
1 changed files with 2 additions and 2 deletions

View File

@ -71,6 +71,7 @@ class Yeti():
types = [] types = []
for obs_to_add in self.get_neighboors(obs['id']): for obs_to_add in self.get_neighboors(obs['id']):
object_misp = self.get_object(obs_to_add) object_misp = self.get_object(obs_to_add)
if object_misp:
self.misp_event.add_object(object_misp) self.misp_event.add_object(object_misp)
print(self.misp_event) print(self.misp_event)
@ -86,7 +87,6 @@ class Yeti():
domain_ip_object.add_attribute(**self.__get_attribute(obj_to_add)) domain_ip_object.add_attribute(**self.__get_attribute(obj_to_add))
#domain_ip_object.add_reference(self.attribute['uuid'], 'related_to') #domain_ip_object.add_reference(self.attribute['uuid'], 'related_to')
domain_ip_object.add_attribute(**self.attribute) domain_ip_object.add_attribute(**self.attribute)
print(domain_ip_object.to_json())
return domain_ip_object return domain_ip_object
def __get_attribute(self, obj_yeti): def __get_attribute(self, obj_yeti):