def test_choices_not_valid_choice(self): self.expect_raises(valid.choice(valid.string, ('a', 'b', 'c')), 'd', errors=['The value is not a valid choice: d'] )
def test_choices(self): self.expect(valid.choice(valid.string, ('a', 'b', 'c')), 'a')