File tree Expand file tree Collapse file tree 1 file changed +0
-31
lines changed
Expand file tree Collapse file tree 1 file changed +0
-31
lines changed Original file line number Diff line number Diff line change @@ -191,37 +191,6 @@ def handler(event, _):
191191 with pytest .raises (ValidationError ):
192192 parse (event , model = Shopping )
193193
194- class NonPydanticModel :
195- pass
196-
197- def test_event_parser_invalid_model_type ():
198- class NonPydanticModel :
199- pass
200-
201- class NonPydanticEnvelope :
202- pass
203-
204- event = {"id" : 123 , "breed" : "Staffie" , "bath" : False }
205-
206- @event_parser (model = NonPydanticModel )
207- def handler (event , _ ):
208- return event
209-
210- # Test direct handler invocation
211- with pytest .raises (exceptions .InvalidModelTypeError ) as exc_info :
212- handler (event , None )
213- assert "unable to be validated" in str (exc_info .value )
214-
215- # Test parse function with invalid model
216- with pytest .raises (exceptions .InvalidModelTypeError ) as exc_info :
217- parse (event = event , model = NonPydanticModel )
218- assert "unable to be validated" in str (exc_info .value )
219-
220- # Test parse function with invalid envelope
221- with pytest .raises (exceptions .InvalidEnvelopeError ) as exc_info :
222- parse (event = event , model = NonPydanticModel , envelope = NonPydanticEnvelope )
223- assert "Error" in str (exc_info .value )
224-
225194
226195@pytest .mark .parametrize (
227196 "test_input,expected" ,
You can’t perform that action at this time.
0 commit comments