def test_clean_translated_locales(self): with mock.patch('i18n.transifex.clean_locale') as patched: transifex.clean_translated_locales(langs=['fr', 'zh_CN']) self.assertEqual(2, patched.call_count) call_args = [('fr', ), ('zh_CN', )] self.assertEqual( call_args, [callarg[0] for callarg in patched.call_args_list])
def test_clean_translated_locales(self): with patch('i18n.transifex.clean_locale') as patched: transifex.clean_translated_locales(langs=['fr', 'zh_CN']) self.assertEqual(2, patched.call_count) call_args = [('fr',), ('zh_CN',)] self.assertEqual( call_args, [callarg[0] for callarg in patched.call_args_list] )
def test_clean_translated_locales(self): with mock.patch('i18n.transifex.clean_locale') as patched: transifex.clean_translated_locales(self.configuration, langs=['fr', 'zh_CN']) self.assertEqual(2, patched.call_count) call_args = [ (self.configuration, 'fr'), (self.configuration, 'zh_CN'), ] self.assertEqual( call_args, [callarg[0] for callarg in patched.call_args_list] )