refactor(substreams-testing): Remove shallow functions, be more 🐍

This commit is contained in:
Florian Pellissier
2024-08-08 00:12:34 +02:00
committed by tvinagre
parent 1f9fe8d583
commit 139f7ac3f5
2 changed files with 3 additions and 10 deletions

View File

@@ -50,10 +50,6 @@ class ProtocolComponentExpectation(BaseModel):
return "\n".join(differences)
@staticmethod
def from_dto(dto: ProtocolComponent) -> "ProtocolComponentExpectation":
return ProtocolComponentExpectation(**dto.dict())
class ProtocolComponentWithTestConfig(ProtocolComponentExpectation):
"""Represents a ProtocolComponent with its main attributes and test configuration."""
@@ -63,9 +59,6 @@ class ProtocolComponentWithTestConfig(ProtocolComponentExpectation):
description="Flag indicating whether to skip simulation for this component",
)
def into_protocol_component(self) -> ProtocolComponentExpectation:
return ProtocolComponentExpectation(**self.dict())
class IntegrationTest(BaseModel):
"""Configuration for an individual test."""