pre-commit changes
parent
0c78acafd0
commit
dbc63b7b9f
|
@ -55,7 +55,7 @@ def get_markings(obj, selectors=None, inherited=False, descendants=False, markin
|
||||||
inherited,
|
inherited,
|
||||||
descendants,
|
descendants,
|
||||||
marking_ref,
|
marking_ref,
|
||||||
lang
|
lang,
|
||||||
)
|
)
|
||||||
|
|
||||||
if inherited:
|
if inherited:
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
from stix2 import exceptions
|
from stix2 import exceptions
|
||||||
from stix2.markings import utils
|
from stix2.markings import utils
|
||||||
from stix2.utils import new_version, is_marking
|
from stix2.utils import is_marking, new_version
|
||||||
|
|
||||||
|
|
||||||
def get_markings(obj, selectors, inherited=False, descendants=False, marking_ref=True, lang=True):
|
def get_markings(obj, selectors, inherited=False, descendants=False, marking_ref=True, lang=True):
|
||||||
|
@ -212,7 +212,7 @@ def clear_markings(obj, selectors, marking_ref=True, lang=True):
|
||||||
|
|
||||||
granular_dict = utils.build_granular_marking([
|
granular_dict = utils.build_granular_marking([
|
||||||
{'selectors': selectors, 'marking_ref': 'N/A'},
|
{'selectors': selectors, 'marking_ref': 'N/A'},
|
||||||
{'selectors': selectors, 'lang': 'N/A'}
|
{'selectors': selectors, 'lang': 'N/A'},
|
||||||
])
|
])
|
||||||
|
|
||||||
clear = granular_dict.get('granular_markings', [])
|
clear = granular_dict.get('granular_markings', [])
|
||||||
|
|
|
@ -478,7 +478,7 @@ GET_MARKINGS_TEST_DATA_LANGS = {
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("data", [GET_MARKINGS_TEST_DATA_LANGS])
|
@pytest.mark.parametrize("data", [GET_MARKINGS_TEST_DATA_LANGS])
|
||||||
def test_get_markings_multiple_selectors(data):
|
def test_get_markings_multiple_selectors_langs(data):
|
||||||
"""Test multiple selectors return combination of markings."""
|
"""Test multiple selectors return combination of markings."""
|
||||||
total = markings.get_markings(data, ["x.y", "x.z"])
|
total = markings.get_markings(data, ["x.y", "x.z"])
|
||||||
xy_markings = markings.get_markings(data, ["x.y"])
|
xy_markings = markings.get_markings(data, ["x.y"])
|
||||||
|
|
Loading…
Reference in New Issue