flakey5
parent
55ac3564bd
commit
f3526bbfa6
|
@ -50,10 +50,11 @@ from .patterns import (AndBooleanExpression, AndObservationExpression,
|
||||||
ReferenceObjectPathComponent, RepeatQualifier,
|
ReferenceObjectPathComponent, RepeatQualifier,
|
||||||
StartStopQualifier, StringConstant, TimestampConstant,
|
StartStopQualifier, StringConstant, TimestampConstant,
|
||||||
WithinQualifier)
|
WithinQualifier)
|
||||||
|
from .STIXPatternVisitor import create_pattern_object
|
||||||
from .utils import new_version, revoke
|
from .utils import new_version, revoke
|
||||||
from .v20 import * # This import will always be the latest STIX 2.X version
|
from .v20 import * # This import will always be the latest STIX 2.X version
|
||||||
from .version import __version__
|
from .version import __version__
|
||||||
from .STIXPatternVisitor import create_pattern_object
|
|
||||||
|
|
||||||
_collect_stix2_obj_maps()
|
_collect_stix2_obj_maps()
|
||||||
|
|
||||||
|
|
|
@ -506,12 +506,12 @@ def test_make_constant_already_a_constant():
|
||||||
|
|
||||||
|
|
||||||
def test_parsing_comparison_expression():
|
def test_parsing_comparison_expression():
|
||||||
patt_obj = create_pattern_object("[file:hashes.'SHA-256' = 'aec070645fe53ee3b3763059376134f058cc337247c978add178b6ccdfb0019f']")
|
patt_obj = stix2.create_pattern_object("[file:hashes.'SHA-256' = 'aec070645fe53ee3b3763059376134f058cc337247c978add178b6ccdfb0019f']")
|
||||||
assert str(patt_obj) == "[file:hashes.'SHA-256' = 'aec070645fe53ee3b3763059376134f058cc337247c978add178b6ccdfb0019f']"
|
assert str(patt_obj) == "[file:hashes.'SHA-256' = 'aec070645fe53ee3b3763059376134f058cc337247c978add178b6ccdfb0019f']"
|
||||||
|
|
||||||
|
|
||||||
def test_parsing_qualified_expression():
|
def test_parsing_qualified_expression():
|
||||||
patt_obj = create_pattern_object(
|
patt_obj = stix2.create_pattern_object(
|
||||||
"[network-traffic:dst_ref.type = 'domain-name' AND network-traffic:dst_ref.value = 'example.com'] REPEATS 5 TIMES WITHIN 1800 SECONDS")
|
"[network-traffic:dst_ref.type = 'domain-name' AND network-traffic:dst_ref.value = 'example.com'] REPEATS 5 TIMES WITHIN 1800 SECONDS")
|
||||||
assert str(
|
assert str(
|
||||||
patt_obj) == "[network-traffic:dst_ref.type = 'domain-name' AND network-traffic:dst_ref.value = 'example.com'] REPEATS 5 TIMES WITHIN 1800 SECONDS"
|
patt_obj) == "[network-traffic:dst_ref.type = 'domain-name' AND network-traffic:dst_ref.value = 'example.com'] REPEATS 5 TIMES WITHIN 1800 SECONDS"
|
||||||
|
|
Loading…
Reference in New Issue