'Ensure that the active locale\'s formats take precedence over the
default settings even if they would be interpreted as False in a
conditional test (e.g. 0 or empty string).
Refs #16938.'

def test_false_like_locale_formats(self):

    from django.conf.locale.fr import formats as fr_formats
    backup_THOUSAND_SEPARATOR = fr_formats.THOUSAND_SEPARATOR
    backup_FIRST_DAY_OF_WEEK = fr_formats.FIRST_DAY_OF_WEEK
    fr_formats.THOUSAND_SEPARATOR = u''
    fr_formats.FIRST_DAY_OF_WEEK = 0
    reset_format_cache()
    with translation.override(u'fr'):
        with self.settings(USE_THOUSAND_SEPARATOR=True, THOUSAND_SEPARATOR=u'!'):
            self.assertEqual(u'', get_format(u'THOUSAND_SEPARATOR'))
            self.assertEqual(u'', get_format(u'THOUSAND_SEPARATOR'))
        with self.settings(FIRST_DAY_OF_WEEK=1):
            self.assertEqual(0, get_format(u'FIRST_DAY_OF_WEEK'))
            self.assertEqual(0, get_format(u'FIRST_DAY_OF_WEEK'))
    fr_formats.THOUSAND_SEPARATOR = backup_THOUSAND_SEPARATOR
    fr_formats.FIRST_DAY_OF_WEEK = backup_FIRST_DAY_OF_WEEK
