Skip to content

Commit

Permalink
Refactor test models
Browse files Browse the repository at this point in the history
  • Loading branch information
treiher committed Sep 13, 2023
1 parent e447781 commit 85abc75
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 33 deletions.
22 changes: 0 additions & 22 deletions tests/data/data_test.py

This file was deleted.

11 changes: 1 addition & 10 deletions tests/data/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

@lru_cache
def null_message() -> Message:
return Message("Null::Message", [], {}, skip_verification=True)
return Message("Null::Message", [], {})


@lru_cache
Expand Down Expand Up @@ -92,7 +92,6 @@ def tlv_message() -> Message:
Link(Field("Value"), FINAL),
],
{Field("Tag"): tlv_tag(), Field("Length"): tlv_length(), Field("Value"): OPAQUE},
skip_verification=True,
)


Expand Down Expand Up @@ -160,7 +159,6 @@ def tlv_with_checksum_message() -> Message:
Field("Checksum"): tlv_with_checksum_checksum(),
},
checksums={ID("Checksum"): [Variable("Tag"), Size("Value"), Variable("Value")]},
skip_verification=True,
)


Expand Down Expand Up @@ -269,7 +267,6 @@ def ethernet_frame() -> Message:
Field("Type_Length"): ethernet_type_length(),
Field("Payload"): OPAQUE,
},
skip_verification=True,
)


Expand Down Expand Up @@ -302,7 +299,6 @@ def enumeration_message() -> Message:
"Enumeration::Message",
[Link(INITIAL, Field("Priority")), Link(Field("Priority"), FINAL)],
{Field("Priority"): enumeration_priority()},
skip_verification=True,
)


Expand Down Expand Up @@ -381,7 +377,6 @@ def sequence_message() -> Message:
Field("Enumeration_Vector"): sequence_enumeration_vector(),
Field("AV_Enumeration_Vector"): sequence_av_enumeration_vector(),
},
skip_verification=True,
)


Expand All @@ -395,7 +390,6 @@ def sequence_inner_message() -> Message:
Link(Field("Payload"), FINAL),
],
{Field("Length"): sequence_length(), Field("Payload"): OPAQUE},
skip_verification=True,
)


Expand All @@ -414,7 +408,6 @@ def sequence_messages_message() -> Message:
Link(Field("Messages"), FINAL),
],
{Field("Length"): sequence_length(), Field("Messages"): sequence_inner_messages()},
skip_verification=True,
)


Expand All @@ -431,7 +424,6 @@ def sequence_sequence_size_defined_by_message_size() -> Message:
Field("Header"): sequence_enumeration(),
Field("Vector"): sequence_integer_vector(),
},
skip_verification=True,
)


Expand Down Expand Up @@ -468,7 +460,6 @@ def expression_message() -> Message:
),
],
{Field("Payload"): OPAQUE},
skip_verification=True,
)


Expand Down
1 change: 0 additions & 1 deletion tests/integration/specification_model_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,6 @@ def test_consistency_specification_parsing_generation(tmp_path: Path) -> None:
Link(Field("Value"), FINAL),
],
{Field("Tag"): tag, Field("Length"): length, Field("Value"): OPAQUE},
skip_verification=True,
)
session = Session(
"Test::Session",
Expand Down

0 comments on commit 85abc75

Please sign in to comment.