Exemplo n.º 1
0
 def test_embedded_no_join(self, testdata: TestData) -> None:
     """Tests embedded method to check JSON-serialization."""
     for data in testdata['session']:
         embedded_data = {
             **data, 'expires': str(data['expires']),
             'created': str(data['created'])
         }
         assert embedded_data == json_roundtrip(
             Session(**data).to_json(join=False))
Exemplo n.º 2
0
 def test_embedded_no_join(self, testdata: TestData) -> None:
     """Tests embedded method to check JSON-serialization."""
     for data in testdata['source_type']:
         assert data == json_roundtrip(
             SourceType(**data).to_json(join=False))
Exemplo n.º 3
0
 def test_embedded_no_join(self, testdata: TestData) -> None:
     """Tests embedded method to check JSON-serialization."""
     for data in testdata['recommendation_tag']:
         assert data == json_roundtrip(
             RecommendationTag(**data).to_json(join=False))
Exemplo n.º 4
0
 def test_embedded(self, testdata: TestData) -> None:
     """Tests embedded method to check JSON-serialization."""
     for data in testdata['facility']:
         assert data == json_roundtrip(Facility(**data).to_json())
Exemplo n.º 5
0
 def test_embedded_no_join(self, testdata: TestData) -> None:
     """Tests embedded method to check JSON-serialization."""
     for data in testdata['observation']:
         embedded_data = {**data, 'time': str(data['time']), 'recorded': str(data['recorded'])}
         assert embedded_data == json_roundtrip(Observation(**data).to_json(join=False))