added tests for dynamodb not equals

This commit is contained in:
Drew Pearce 2018-10-23 15:37:28 -04:00
parent 71a054af92
commit 544050ab27

View File

@ -815,6 +815,16 @@ def test_scan_filter():
)
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
def test_scan_filter2():
@ -872,6 +882,26 @@ def test_scan_filter3():
)
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
def test_scan_filter4():