def test_throws_exception_if_no_choices_given(self): with pytest.raises(ImproperlyConfigured): ChoiceType([])