Skip to content

Commit

Permalink
adds a parameterize on the one level test to test both alias resoluti…
Browse files Browse the repository at this point in the history
…on modes.
  • Loading branch information
matthew-chambers-pushly committed Nov 6, 2023
1 parent 77fc378 commit 368af37
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_data_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,12 +500,15 @@ class DataClass(DataClassDictMixin):


@pytest.mark.parametrize("value_info", inner_values)
def test_one_level(value_info):
@pytest.mark.parametrize("deserialization_not_by_alias", [False, True])
def test_one_level(value_info, deserialization_not_by_alias):
x_type, x_value, x_value_dumped = value_info

@dataclass
class DataClass(DataClassDictMixin):
x: x_type
class Config(BaseConfig):
allow_deserialization_not_by_alias = deserialization_not_by_alias

instance = DataClass(x_value)
dumped = {"x": x_value_dumped}
Expand Down

0 comments on commit 368af37

Please sign in to comment.