Back to Black
This commit is contained in:
parent
ea489bce6c
commit
5697ff87a8
112 changed files with 1803 additions and 977 deletions
|
|
@ -211,7 +211,11 @@ def test_execution_of_remove_in_map():
|
|||
"itemlist": {
|
||||
"L": [
|
||||
{"M": {"foo00": {"S": "bar1"}, "foo01": {"S": "bar2"}}},
|
||||
{"M": {"foo10": {"S": "bar1"},}},
|
||||
{
|
||||
"M": {
|
||||
"foo10": {"S": "bar1"},
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -260,7 +264,9 @@ def test_execution_of_remove_in_list():
|
|||
"itemmap": {
|
||||
"M": {
|
||||
"itemlist": {
|
||||
"L": [{"M": {"foo00": {"S": "bar1"}, "foo01": {"S": "bar2"}}},]
|
||||
"L": [
|
||||
{"M": {"foo00": {"S": "bar1"}, "foo01": {"S": "bar2"}}},
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -277,7 +283,10 @@ def test_execution_of_delete_element_from_set():
|
|||
hash_key_type="TYPE",
|
||||
range_key=None,
|
||||
range_key_type=None,
|
||||
attrs={"id": {"S": "foo2"}, "s": {"SS": ["value1", "value2", "value3"]},},
|
||||
attrs={
|
||||
"id": {"S": "foo2"},
|
||||
"s": {"SS": ["value1", "value2", "value3"]},
|
||||
},
|
||||
)
|
||||
validated_ast = UpdateExpressionValidator(
|
||||
update_expression_ast,
|
||||
|
|
@ -291,7 +300,10 @@ def test_execution_of_delete_element_from_set():
|
|||
hash_key_type="TYPE",
|
||||
range_key=None,
|
||||
range_key_type=None,
|
||||
attrs={"id": {"S": "foo2"}, "s": {"SS": ["value1", "value3"]},},
|
||||
attrs={
|
||||
"id": {"S": "foo2"},
|
||||
"s": {"SS": ["value1", "value3"]},
|
||||
},
|
||||
)
|
||||
assert expected_item == item
|
||||
|
||||
|
|
@ -304,7 +316,10 @@ def test_execution_of_add_number():
|
|||
hash_key_type="TYPE",
|
||||
range_key=None,
|
||||
range_key_type=None,
|
||||
attrs={"id": {"S": "foo2"}, "s": {"N": "5"},},
|
||||
attrs={
|
||||
"id": {"S": "foo2"},
|
||||
"s": {"N": "5"},
|
||||
},
|
||||
)
|
||||
validated_ast = UpdateExpressionValidator(
|
||||
update_expression_ast,
|
||||
|
|
@ -331,7 +346,10 @@ def test_execution_of_add_set_to_a_number():
|
|||
hash_key_type="TYPE",
|
||||
range_key=None,
|
||||
range_key_type=None,
|
||||
attrs={"id": {"S": "foo2"}, "s": {"N": "5"},},
|
||||
attrs={
|
||||
"id": {"S": "foo2"},
|
||||
"s": {"N": "5"},
|
||||
},
|
||||
)
|
||||
try:
|
||||
validated_ast = UpdateExpressionValidator(
|
||||
|
|
@ -362,7 +380,10 @@ def test_execution_of_add_to_a_set():
|
|||
hash_key_type="TYPE",
|
||||
range_key=None,
|
||||
range_key_type=None,
|
||||
attrs={"id": {"S": "foo2"}, "s": {"SS": ["value1", "value2", "value3"]},},
|
||||
attrs={
|
||||
"id": {"S": "foo2"},
|
||||
"s": {"SS": ["value1", "value2", "value3"]},
|
||||
},
|
||||
)
|
||||
validated_ast = UpdateExpressionValidator(
|
||||
update_expression_ast,
|
||||
|
|
@ -386,13 +407,34 @@ def test_execution_of_add_to_a_set():
|
|||
|
||||
@parameterized(
|
||||
[
|
||||
({":value": {"S": "10"}}, "STRING",),
|
||||
({":value": {"N": "10"}}, "NUMBER",),
|
||||
({":value": {"B": "10"}}, "BINARY",),
|
||||
({":value": {"BOOL": True}}, "BOOLEAN",),
|
||||
({":value": {"NULL": True}}, "NULL",),
|
||||
({":value": {"M": {"el0": {"S": "10"}}}}, "MAP",),
|
||||
({":value": {"L": []}}, "LIST",),
|
||||
(
|
||||
{":value": {"S": "10"}},
|
||||
"STRING",
|
||||
),
|
||||
(
|
||||
{":value": {"N": "10"}},
|
||||
"NUMBER",
|
||||
),
|
||||
(
|
||||
{":value": {"B": "10"}},
|
||||
"BINARY",
|
||||
),
|
||||
(
|
||||
{":value": {"BOOL": True}},
|
||||
"BOOLEAN",
|
||||
),
|
||||
(
|
||||
{":value": {"NULL": True}},
|
||||
"NULL",
|
||||
),
|
||||
(
|
||||
{":value": {"M": {"el0": {"S": "10"}}}},
|
||||
"MAP",
|
||||
),
|
||||
(
|
||||
{":value": {"L": []}},
|
||||
"LIST",
|
||||
),
|
||||
]
|
||||
)
|
||||
def test_execution_of__delete_element_from_set_invalid_value(
|
||||
|
|
@ -406,7 +448,10 @@ def test_execution_of__delete_element_from_set_invalid_value(
|
|||
hash_key_type="TYPE",
|
||||
range_key=None,
|
||||
range_key_type=None,
|
||||
attrs={"id": {"S": "foo2"}, "s": {"SS": ["value1", "value2", "value3"]},},
|
||||
attrs={
|
||||
"id": {"S": "foo2"},
|
||||
"s": {"SS": ["value1", "value2", "value3"]},
|
||||
},
|
||||
)
|
||||
try:
|
||||
validated_ast = UpdateExpressionValidator(
|
||||
|
|
@ -431,7 +476,10 @@ def test_execution_of_delete_element_from_a_string_attribute():
|
|||
hash_key_type="TYPE",
|
||||
range_key=None,
|
||||
range_key_type=None,
|
||||
attrs={"id": {"S": "foo2"}, "s": {"S": "5"},},
|
||||
attrs={
|
||||
"id": {"S": "foo2"},
|
||||
"s": {"S": "5"},
|
||||
},
|
||||
)
|
||||
try:
|
||||
validated_ast = UpdateExpressionValidator(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue