示例#1
0
 def test_tuple(self, testdata: TestData) -> None:
     """Test tuple-conversion."""
     for data in testdata['alert']:
         alert = Alert.from_dict(data)
         assert tuple(data.values()) == alert.to_tuple()
示例#2
0
 def test_dict(self, testdata: TestData) -> None:
     """Test round-trip of dict translations."""
     for data in testdata['alert']:
         alert = Alert.from_dict(data)
         assert data == alert.to_dict()