I have lets say two dataclasses where one is used inside the other like this :
@dataclass(frozen=True)
class SensorModel:
sensor_id: int
type: str
health_status: bool
@dataclass
class SamplingModel:
trigger: str
priority: str = field(init=False)
time: datetime
sensors: List[SensorModel]
how can I use hypothesis to generate sample for my testing from this?
I have found in the docs that hypothesis strategies support dataclasses natively hypothesis but no examples ANYWHERE about how to do it in a simple case like the one described.