commit
d685a9f50a
@ -383,7 +383,7 @@ class OpNotEqual(Op):
|
|||||||
def expr(self, item):
|
def expr(self, item):
|
||||||
lhs = self._lhs(item)
|
lhs = self._lhs(item)
|
||||||
rhs = self._rhs(item)
|
rhs = self._rhs(item)
|
||||||
return lhs == rhs
|
return lhs != rhs
|
||||||
|
|
||||||
|
|
||||||
class OpLessThanOrEqual(Op):
|
class OpLessThanOrEqual(Op):
|
||||||
|
@ -815,6 +815,16 @@ def test_scan_filter():
|
|||||||
)
|
)
|
||||||
assert response['Count'] == 1
|
assert response['Count'] == 1
|
||||||
|
|
||||||
|
response = table.scan(
|
||||||
|
FilterExpression=Attr('app').ne('app2')
|
||||||
|
)
|
||||||
|
assert response['Count'] == 1
|
||||||
|
|
||||||
|
response = table.scan(
|
||||||
|
FilterExpression=Attr('app').ne('app1')
|
||||||
|
)
|
||||||
|
assert response['Count'] == 0
|
||||||
|
|
||||||
|
|
||||||
@mock_dynamodb2
|
@mock_dynamodb2
|
||||||
def test_scan_filter2():
|
def test_scan_filter2():
|
||||||
@ -872,6 +882,26 @@ def test_scan_filter3():
|
|||||||
)
|
)
|
||||||
assert response['Count'] == 1
|
assert response['Count'] == 1
|
||||||
|
|
||||||
|
response = table.scan(
|
||||||
|
FilterExpression=Attr('active').ne(True)
|
||||||
|
)
|
||||||
|
assert response['Count'] == 0
|
||||||
|
|
||||||
|
response = table.scan(
|
||||||
|
FilterExpression=Attr('active').ne(False)
|
||||||
|
)
|
||||||
|
assert response['Count'] == 1
|
||||||
|
|
||||||
|
response = table.scan(
|
||||||
|
FilterExpression=Attr('app').ne(1)
|
||||||
|
)
|
||||||
|
assert response['Count'] == 0
|
||||||
|
|
||||||
|
response = table.scan(
|
||||||
|
FilterExpression=Attr('app').ne(2)
|
||||||
|
)
|
||||||
|
assert response['Count'] == 1
|
||||||
|
|
||||||
|
|
||||||
@mock_dynamodb2
|
@mock_dynamodb2
|
||||||
def test_scan_filter4():
|
def test_scan_filter4():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user