Beispiel #1
0
 def test_embedded_no_join(self, testdata: TestData) -> None:
     """Tests embedded method to check JSON-serialization."""
     for data in testdata['source']:
         assert data == json_roundtrip(Source(**data).to_json(join=False))
Beispiel #2
0
 def test_init(self, testdata: TestData) -> None:
     """Create source instance and validate accessors."""
     for data in testdata['source']:
         source = Source(**data)
         for key, value in data.items():
             assert getattr(source, key) == value