def test_without_target_culture_and_without_culture_fallback_to_english_culture( self): recognizer = SequenceRecognizer() self.assert_models_equal(self.control_model, recognizer.get_phone_number_model())
def test_with_invalid_culture_use_target_culture(self): recognizer = SequenceRecognizer(self.spanish_culture) self.assert_models_equal( self.control_model, recognizer.get_phone_number_model(self.invalid_culture))
def test_with_invalid_culture_as_target_and_without_fallback_throw_error( self): recognizer = SequenceRecognizer(self.invalid_culture) with pytest.raises(ValueError): recognizer.get_phone_number_model(None, False)
def test_without_culture_use_target_culture(self): recognizer = SequenceRecognizer(self.english_culture) self.assert_models_equal(self.control_model, recognizer.get_phone_number_model())