def test_changed_resources_sync(self):
        TranslationFactory.create(locale=self.translated_locale, entity=self.main_db_entity,
            approved=True, date=aware_datetime(2015, 1, 1))

        resource_file = MagicMock()
        self.changeset.vcs_project.resources = {
            self.main_db_entity.resource.path: resource_file
        }

        with patch.object(self.main_db_entity, 'has_changed', return_value=True) as mock_has_changed:
            self.changeset.update_vcs_entity(self.translated_locale, self.main_db_entity, MagicMock())

            self.changeset.execute_update_vcs()
            assert mock_has_changed.called
            assert resource_file.save.called
Synchronization should modify resource files if there
dataset/ETHPy150Open mozilla/pontoon/pontoon/sync/tests/test_changeset.py/ChangeSetTests.test_changed_resources_sync