Exemplo n.º 1
0
 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'))
Exemplo n.º 2
0
 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"),
     )