Skip to content

Commit 56f014f

Browse files
Adding test
1 parent e6ab847 commit 56f014f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import pytest
2+
3+
from aws_lambda_powertools.utilities.jmespath_utils import extract_data_from_envelope
4+
from aws_lambda_powertools.warnings import PowertoolsDeprecationWarning
5+
6+
7+
def test_extract_data_from_envelope():
8+
data = {"data": {"foo": "bar"}}
9+
envelope = "data"
10+
11+
with pytest.warns(PowertoolsDeprecationWarning, match="The extract_data_from_envelope method is deprecated in V3*"):
12+
assert extract_data_from_envelope(data=data, envelope=envelope) == {"foo": "bar"}

0 commit comments

Comments
 (0)