def test_flaskbbdomain_translations(default_settings): domain = FlaskBBDomain(current_app) with current_app.test_request_context(): assert domain.get_translations_cache() == {} # just to be on the safe side that there are really no compiled # translations available _remove_compiled_translations() # no compiled translations are available assert isinstance(domain.get_translations(), NullTranslations) # lets compile them and test again _compile_translations() # now there should be translations :) assert isinstance(domain.get_translations(), Translations)
def test_flaskbbdomain_translations(): domain = FlaskBBDomain(current_app) assert domain.get_translations_cache() == {} # returns an translation object assert domain.get_translations() is not None assert len(domain.get_translations_cache()) > 0