moto/tests/test_dynamodb2
pvbouwel 7ea419dd54 Better DDB expressions support1: TokenizationDDB
Currently the mock for DynamoDB has adhoc code to implement
its updateExpression functionality.  This series will
transform the logic such that Update Expressions are processed
as follows:
 1) Expression gets parsed into a tokenlist (tokenized) -> This commit
 2) Tokenlist get transformed to expression tree (AST)
 3) The AST gets validated (full semantic correctness)
 4) AST gets processed to perform the update

This alows for a more realistic mocking. It will throw exceptions much
more aggressively avoiding situations where a test passes against the
mock but fails with an exception when running against AWS.

Introduction of step 3 also allows to have the update expression as an
atomic unit of work. So updates at the start of the expression cannot
be performed if there is an error further down the expression.

This specific commit will tokenize expressions but the tokenlist is not
yet used. It is purely to keep clear boundaries.  It does do a minor
refactoring of the exceptions to allow more re-use and to ease testing.

This series of changes is to aid providing a long-term solution for
https://github.com/spulec/moto/issues/2806.
2020-04-18 09:16:23 +01:00
..
test_dynamodb_expression_tokenizer.py Better DDB expressions support1: TokenizationDDB 2020-04-18 09:16:23 +01:00
test_dynamodb_table_with_range_key.py #2813 - DynamoDB - Add Global Index Status 2020-03-17 15:41:50 +00:00
test_dynamodb_table_without_range_key.py Run black on moto & test directories. 2019-10-31 10:36:05 -07:00
test_dynamodb.py Fixed dynamodb2 put_item ValidationException 2020-03-28 17:59:42 +00:00
test_server.py Run black on moto & test directories. 2019-10-31 10:36:05 -07:00