os-threat / Stix-ORM

GNU Affero General Public License v3.0
4 stars 0 forks source link

Creating first feed approach #20

Closed priamai closed 10 months ago

priamai commented 1 year ago

Hello it's me again looking for trouble:

https://github.com/os-threat/Stix-ORM/blob/brett-attack/test/test_feed.py

What is the intended approach to add a feed? I tried both as a list of objects or a bundle, but both fail. The first one fails because it can't create the Bundle from our custom objects this is a problem we will need to solve, the second one fails because the add method cannot add a list of STIX objects directly.

def test_create_feed(database:TypeDBSink,empty_feed:Bundle):
    '''

    Now create the feed for the first time, there is no content to begin with...
    Args:
        database:
        simple_feed:

    Returns:

    '''
    result = database.add(empty_feed)
    print(result)

def test_create_feed_list(database:TypeDBSink,empty_feed_list):
    '''

    Now create the feed for the first time, there is no content to begin with...
    Args:
        database:
        simple_feed:

    Returns:

    '''
    result = database.add(empty_feed_list)
    print(result)

What's the desired approach here, just add via a list of dicts?

brettforbes commented 1 year ago

let me have a go

priamai commented 10 months ago

This was working now.