def test_initialization_with_invalid_options_throw_error(self):
     with pytest.raises(ValueError):
         ChoiceRecognizer(self.invalid_culture, -1)
 def test_initialization_with_int_option_resolve_options_enum(self):
     recognizer = ChoiceRecognizer(
         self.english_culture, ChoiceOptions.NONE, False)
     assert (recognizer.options & ChoiceOptions.NONE) == ChoiceOptions.NONE
 def test_without_target_culture_and_without_culture_fallback_to_english_culture(
         self):
     recognizer = ChoiceRecognizer()
     self.assert_model_equal(
         self.control_model,
         recognizer.get_boolean_model())
 def test_with_invalid_culture_as_target_and_without_fallback_throw_error(
         self):
     recognizer = ChoiceRecognizer(self.invalid_culture)
     with pytest.raises(ValueError):
         recognizer.get_boolean_model(None, False)
 def test_with_invalid_culture_use_target_culture(self):
     recognizer = ChoiceRecognizer(self.spanish_culture)
     self.assert_model_equal(
         self.control_model,
         recognizer.get_boolean_model(
             self.invalid_culture))
 def test_without_culture_use_target_culture(self):
     recognizer = ChoiceRecognizer(self.english_culture)
     self.assert_model_equal(
         self.control_model,
         recognizer.get_boolean_model())