commit
58f39f80af
|
@ -24,7 +24,7 @@ class TimestampConstant(_Constant):
|
|||
self.value = value
|
||||
|
||||
def __str__(self):
|
||||
return "'%s'" % escape_quotes_and_backslashes(self.value)
|
||||
return "t'%s'" % escape_quotes_and_backslashes(self.value)
|
||||
|
||||
|
||||
class IntegerConstant(_Constant):
|
||||
|
|
|
@ -170,3 +170,8 @@ 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 test_timestamp():
|
||||
ts = stix2.TimestampConstant('2014-01-13T07:03:17Z')
|
||||
assert str(ts) == "t'2014-01-13T07:03:17Z'"
|
||||
|
|
Loading…
Reference in New Issue