def test_parse_observable_with_no_version(): observable = {"type": "file", "name": "foo.exe", "spec_version": "2.1"} obs_obj = parsing.parse_observable(observable) v = 'v21' assert v in str(obs_obj.__class__)
def test_parse_observable_with_version(): observable = {"type": "file", "name": "foo.exe"} obs_obj = parsing.parse_observable(observable, version='2.1') v = 'v21' assert v in str(obs_obj.__class__)