diff --git a/tests/test_optional.py b/tests/test_optional.py new file mode 100644 index 00000000..16610ee7 --- /dev/null +++ b/tests/test_optional.py @@ -0,0 +1,18 @@ +from typing import Dict, Optional +from unittest import TestCase + +from dataclasses import dataclass + +from dataclass_factory import Factory + + +@dataclass +class Data: + x: Optional[Dict[str, None]] + + +class TestOptional(TestCase): + def test_optional(self): + factory = Factory() + y = factory.load({"x": None}, Data) + self.assertEqual(y, Data(None)) diff --git a/tests/test_synonym.py b/tests/test_synonym.py new file mode 100644 index 00000000..e69de29b