Skip to content

Commit

Permalink
Add test search_mode param
Browse files Browse the repository at this point in the history
Signed-off-by: romanodanilo <[email protected]>
  • Loading branch information
romanodanilo committed Jul 22, 2024
1 parent 1c560f4 commit 5cdaf36
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions qc_baselib/models/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ class LocationType(BaseXmlModel):
@model_validator(mode="after")
def check_at_least_one_element(self) -> Any:
if (
len(self.file_location)
+ len(self.xml_location)
+ len(self.inertial_location)
len(self.file_location) + len(self.xml_location) + len(self.inertial_location)
< 1
):
raise ValueError(
Expand Down Expand Up @@ -194,7 +192,7 @@ class StatusType(str, enum.Enum):
SKIPPED = "skipped"


class CheckerType(BaseXmlModel, validate_assignment=True):
class CheckerType(BaseXmlModel, validate_assignment=True, search_mode="ordered"):
addressed_rule: List[RuleType] = element(tag="AddressedRule", default=[])
issues: List[IssueType] = element(tag="Issue", default=[])
metadata: List[MetadataType] = element(tag="Metadata", default=[])
Expand Down

0 comments on commit 5cdaf36

Please sign in to comment.