Exemplo n.º 1
0
def test_set_op():
    exp = stix2.ObservationExpression(
        stix2.IsSubsetComparisonExpression(
            "network-traffic:dst_ref.value",
            "2001:0db8:dead:beef:0000:0000:0000:0000/64"))
    assert str(
        exp
    ) == "[network-traffic:dst_ref.value ISSUBSET '2001:0db8:dead:beef:0000:0000:0000:0000/64']"
 def visitPropTestIsSubset(self, ctx):
     children = self.visitChildren(ctx)
     return stix2.IsSubsetComparisonExpression(children[0], children[2])