'Tests django.utils.formats.sanitize_separators.'

def test_sanitize_separators(self):

    self.assertEqual(sanitize_separators(123), 123)
    with translation.override(u'ru', deactivate=True):
        with self.settings(USE_THOUSAND_SEPARATOR=True):
            self.assertEqual(sanitize_separators(u'1\xa0234\xa0567'), u'1234567')
            self.assertEqual(sanitize_separators(u'77\xa0777,777'), u'77777.777')
            self.assertEqual(sanitize_separators(u'12    345'), u'12345')
            self.assertEqual(sanitize_separators(u'77    777,777'), u'77777.777')
        with self.settings(USE_THOUSAND_SEPARATOR=True, USE_L10N=False):
            self.assertEqual(sanitize_separators(u'12\xa0345'), u'12\xa0345')
