def test_greater_than_python_constant():
    exp1 = stix2.GreaterThanComparisonExpression(
        "file:extensions.windows-pebinary-ext.sections[*].entropy", 7.0)
    exp = stix2.ObservationExpression(exp1)
    assert str(
        exp
    ) == "[file:extensions.windows-pebinary-ext.sections[*].entropy > 7.0]"
Example #2
0
def test_greater_than():
    exp1 = stix2.GreaterThanComparisonExpression(
        "file:extensions.'windows-pebinary-ext'.sections[*].entropy",
        stix2.FloatConstant(7.0),
    )
    exp = stix2.ObservationExpression(exp1)
    assert str(exp) == "[file:extensions.'windows-pebinary-ext'.sections[*].entropy > 7.0]"