Fix FileSystemSource.all_versions bug

If `get()` returned a single STIX object, `all_versions()` would return a
list of the properties/values of that object.
stix2.1
Chris Lenk 2017-10-06 14:02:25 -04:00
parent 1821cdb197
commit 23e3b3cc20
2 changed files with 2 additions and 2 deletions

View File

@ -185,7 +185,7 @@ class FileSystemSource(DataSource):
a python STIX objects and then returned
"""
return list(self.get(stix_id=stix_id, _composite_filters=_composite_filters))
return [self.get(stix_id=stix_id, _composite_filters=_composite_filters)]
def query(self, query=None, _composite_filters=None):
"""search and retrieve STIX objects based on the complete query

View File

@ -703,7 +703,7 @@ def test_filesystem_store():
# add()
camp1 = Campaign(name="Great Heathen Army",
objective="Targeting the government of United Kingdom and insitutions affiliated with the Church Of Englang",
objective="Targeting the government of United Kingdom and insitutions affiliated with the Church Of England",
aliases=["Ragnar"])
fs_store.add(camp1)