File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 28
28
UserMigrationTriggerEvent ,
29
29
VerifyAuthChallengeResponseTriggerEvent ,
30
30
)
31
- from aws_lambda_powertools .utilities .data_classes .common import BaseProxyEvent
31
+ from aws_lambda_powertools .utilities .data_classes .common import BaseProxyEvent , DictWrapper
32
32
from aws_lambda_powertools .utilities .data_classes .dynamo_db_stream_event import (
33
33
AttributeValue ,
34
34
DynamoDBRecordEventName ,
@@ -43,6 +43,16 @@ def load_event(file_name: str) -> dict:
43
43
return json .load (fp )
44
44
45
45
46
+ def test_dict_wrapper_equals ():
47
+ class DataClassSample (DictWrapper ):
48
+ @property
49
+ def message (self ) -> str :
50
+ return self .get ("message" )
51
+
52
+ assert DataClassSample ({"message" : "foo1" }) == DataClassSample ({"message" : "foo1" })
53
+ assert DataClassSample ({"message" : "foo1" }) != DataClassSample ({"message" : "foo2" })
54
+
55
+
46
56
def test_cloud_watch_trigger_event ():
47
57
event = CloudWatchLogsEvent (load_event ("cloudWatchLogEvent.json" ))
48
58
You can’t perform that action at this time.
0 commit comments