File tree Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Original file line number Diff line number Diff line change @@ -69,31 +69,3 @@ def test_validate_event_does_not_conform_with_schema():
69
69
event_dict : Any = {"hello" : "s" }
70
70
with pytest .raises (ValidationError ):
71
71
handle_dynamodb (event_dict , LambdaContext ())
72
-
73
-
74
- def test_validate_event_neither_image_exists_with_schema ():
75
- event_dict : Any = {
76
- "Records" : [
77
- {
78
- "eventID" : "1" ,
79
- "eventName" : "INSERT" ,
80
- "eventVersion" : "1.0" ,
81
- "eventSourceARN" : "eventsource_arn" ,
82
- "awsRegion" : "us-west-2" ,
83
- "eventSource" : "aws:dynamodb" ,
84
- "dynamodb" : {
85
- "StreamViewType" : "NEW_AND_OLD_IMAGES" ,
86
- "SequenceNumber" : "111" ,
87
- "SizeBytes" : 26 ,
88
- "Keys" : {"Id" : {"N" : "101" }},
89
- },
90
- }
91
- ]
92
- }
93
- with pytest .raises (ValidationError ) as exc_info :
94
- handle_dynamodb (event_dict , LambdaContext ())
95
-
96
- validation_error : ValidationError = exc_info .value
97
- assert len (validation_error .errors ()) == 1
98
- error = validation_error .errors ()[0 ]
99
- assert error ["msg" ] == "DynamoDB streams schema failed validation, missing both new & old stream images"
You can’t perform that action at this time.
0 commit comments