def test_invalid_argument_type_optional(self): selection_set = _.is_housetrained(at_other_homes='foo') with pytest.raises(quiz.SelectionError) as exc: quiz.validate(Dog, selection_set) assert exc.value == quiz.SelectionError( Dog, 'is_housetrained', quiz.InvalidArgumentType('at_other_homes', 'foo'))
def test_invalid_argument_type_optional(self): selection_set = _.is_housetrained(at_other_homes="foo") with pytest.raises(quiz.SelectionError) as exc: quiz.validate(Dog, selection_set) assert exc.value == quiz.SelectionError( Dog, "is_housetrained", quiz.InvalidArgumentType("at_other_homes", "foo"), )