File tree 2 files changed +0
-34
lines changed 2 files changed +0
-34
lines changed Original file line number Diff line number Diff line change @@ -127,10 +127,6 @@ def model_post_init(self, _: None) -> None:
127
127
](self ._COMMAND_ID ),
128
128
),
129
129
)
130
- elif self .header .length != len (data_bytes ):
131
- raise SMPMalformed (
132
- f"header.length { self .header .length } != len(data_bytes) { len (data_bytes )} "
133
- )
134
130
self ._bytes = cast (smpheader .Header , self .header ).BYTES + data_bytes
135
131
136
132
Original file line number Diff line number Diff line change @@ -103,33 +103,3 @@ def test_ImageUploadWriteResponse_injected_header() -> None:
103
103
104
104
assert cast (smphdr .Header , r .header ).length == 10
105
105
assert len (r .BYTES ) == 10 + smphdr .Header .SIZE
106
-
107
- with pytest .raises (SMPMalformed ):
108
- r = smpimg .ImageUploadProgressWriteResponse (
109
- header = smphdr .Header (
110
- op = h .op ,
111
- version = h .version ,
112
- flags = h .flags ,
113
- length = 2 ,
114
- group_id = h .group_id ,
115
- sequence = h .sequence ,
116
- command_id = h .command_id ,
117
- ),
118
- rc = 0 ,
119
- off = 0 ,
120
- )
121
-
122
- with pytest .raises (SMPMalformed ):
123
- r = smpimg .ImageUploadProgressWriteResponse (
124
- header = smphdr .Header (
125
- op = h .op ,
126
- version = h .version ,
127
- flags = h .flags ,
128
- length = 0 ,
129
- group_id = h .group_id ,
130
- sequence = h .sequence ,
131
- command_id = h .command_id ,
132
- ),
133
- rc = 0 ,
134
- off = 0 ,
135
- )
You can’t perform that action at this time.
0 commit comments