Merge fork changes.
commit
835d675162
|
@ -412,9 +412,7 @@ class DataSource(object):
|
|||
stix_obj (dictionary): the STIX object to be returned
|
||||
|
||||
"""
|
||||
stix_obj = None
|
||||
|
||||
return stix_obj
|
||||
raise NotImplementedError()
|
||||
|
||||
@abc.abstractmethod
|
||||
def all_versions(self, id_, _composite_filters=None):
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
import pytest
|
||||
|
||||
import stix2.sources
|
||||
|
||||
|
||||
def test_data_source():
|
||||
ds = stix2.sources.DataSource()
|
||||
|
||||
assert ds.name == "DataSource"
|
||||
|
||||
|
||||
def test_set_data_source_name():
|
||||
ds = stix2.sources.DataSource(name="My Data Source")
|
||||
|
||||
assert ds.name == "My Data Source"
|
||||
|
||||
|
||||
def test_data_source_get():
|
||||
ds = stix2.sources.DataSource(name="My Data Source")
|
||||
|
||||
with pytest.raises(NotImplementedError):
|
||||
ds.get("foo")
|
Loading…
Reference in New Issue