Skip to content

Commit

Permalink
ISSUE-1503: Add DictWrapper Mapping abc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tankanow committed Sep 12, 2022
1 parent 6a01cfa commit d345979
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Empty file added tests/__init__.py
Empty file.
13 changes: 13 additions & 0 deletions tests/functional/test_data_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,19 @@ def message(self) -> str:
assert DataClassSample(data1).raw_event is data1


def test_dict_wrapper_imlements_mapping():
class DataClassSample(DictWrapper):
pass

data = {"message": "foo1"}
dcs = DataClassSample(data)
assert len(dcs) == len(data)
assert list(dcs) == list(data)
assert dcs.keys() == data.keys()
assert list(dcs.values()) == list(data.values())
assert dcs.items() == data.items()


def test_cloud_watch_dashboard_event():
event = CloudWatchDashboardCustomWidgetEvent(load_event("cloudWatchDashboardEvent.json"))
assert event.describe is False
Expand Down

0 comments on commit d345979

Please sign in to comment.