Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_less_equal_operator(self):
assert str(LessEqualOperator("kernelmajversion", 4))\
== '["<=", "kernelmajversion", 4]'
assert str(LessEqualOperator("end_time", "2016-05-11T23:53:29.962Z"))\
== '["<=", "end_time", "2016-05-11T23:53:29.962Z"]'
assert str(LessEqualOperator(['parameter', 'version'], 4.0))\
== '["<=", ["parameter", "version"], 4.0]'
assert str(LessEqualOperator("report_timestamp",
datetime.datetime(2016, 6, 11)))\
== '["<=", "report_timestamp", "2016-06-11 00:00:00"]'
def test_less_equal_operator(self):
assert str(LessEqualOperator("kernelmajversion", 4))\
== '["<=", "kernelmajversion", 4]'
assert str(LessEqualOperator("end_time", "2016-05-11T23:53:29.962Z"))\
== '["<=", "end_time", "2016-05-11T23:53:29.962Z"]'
assert str(LessEqualOperator(['parameter', 'version'], 4.0))\
== '["<=", ["parameter", "version"], 4.0]'
assert str(LessEqualOperator("report_timestamp",
datetime.datetime(2016, 6, 11)))\
== '["<=", "report_timestamp", "2016-06-11 00:00:00"]'
def test_less_equal_operator(self):
assert str(LessEqualOperator("kernelmajversion", 4))\
== '["<=", "kernelmajversion", 4]'
assert str(LessEqualOperator("end_time", "2016-05-11T23:53:29.962Z"))\
== '["<=", "end_time", "2016-05-11T23:53:29.962Z"]'
assert str(LessEqualOperator(['parameter', 'version'], 4.0))\
== '["<=", ["parameter", "version"], 4.0]'
assert str(LessEqualOperator("report_timestamp",
datetime.datetime(2016, 6, 11)))\
== '["<=", "report_timestamp", "2016-06-11 00:00:00"]'
def test_less_equal_operator(self):
assert str(LessEqualOperator("kernelmajversion", 4))\
== '["<=", "kernelmajversion", 4]'
assert str(LessEqualOperator("end_time", "2016-05-11T23:53:29.962Z"))\
== '["<=", "end_time", "2016-05-11T23:53:29.962Z"]'
assert str(LessEqualOperator(['parameter', 'version'], 4.0))\
== '["<=", ["parameter", "version"], 4.0]'
assert str(LessEqualOperator("report_timestamp",
datetime.datetime(2016, 6, 11)))\
== '["<=", "report_timestamp", "2016-06-11 00:00:00"]'
def __init__(self, field, value):
super(LessEqualOperator, self).__init__("<=", field, value)