Refs #30372 -- Stopped watching built-in Django translation files by auto-reloader.

This commit is contained in:
Tom Forbes 2020-04-18 21:32:19 +01:00 committed by Mariusz Felisiak
parent 8f10ceaa90
commit c00bc27945
3 changed files with 19 additions and 1 deletions

View file

@ -1865,6 +1865,12 @@ class WatchForTranslationChangesTests(SimpleTestCase):
project_dir = Path(__file__).parent / 'sampleproject' / 'locale'
mocked_sender.watch_dir.assert_any_call(project_dir, '**/*.mo')
def test_i18n_app_dirs_ignore_django_apps(self):
mocked_sender = mock.MagicMock()
with self.settings(INSTALLED_APPS=['django.contrib.admin']):
watch_for_translation_changes(mocked_sender)
mocked_sender.watch_dir.assert_called_once_with(Path('locale'), '**/*.mo')
def test_i18n_local_locale(self):
mocked_sender = mock.MagicMock()
watch_for_translation_changes(mocked_sender)