Skip to content

Commit

Permalink
verify #380 fix (278c753) works
Browse files Browse the repository at this point in the history
  • Loading branch information
aaraney authored and robertbartel committed Jul 10, 2023
1 parent c922a46 commit 83c365c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions python/lib/core/dmod/test/test_serializable_field_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,3 +277,13 @@ def test_raises_runtime_error_too_few_params_N(self):

with self.assertRaises(RuntimeError):
o.dict()

def test_fixes_380(self):
class Model(Serializable):
field: int

class Config(Serializable.Config):
field_serializers = {"field": str}

m = Model(field=42)
self.assertDictEqual(m.dict(), {"field": "42"})

0 comments on commit 83c365c

Please sign in to comment.