def test_obsolete_vcs_resources_paths(self):
        obsolete_vcs_resources = [
            'obsolete.properties',
            'second_obsolete.properties',
        ]
        obsolete_paths = [
            os.path.join(locale_directory_path(self.vcs_project.checkout_path, self.translated_locale.code), path)
            for path in obsolete_vcs_resources
        ]

        # We test if we remove only resources available on disk
        self.changeset.changes['obsolete_vcs_resources'] = obsolete_paths + ['second_obsolete.properties']

        with patch('os.path.exists', side_effect=lambda p: p in obsolete_paths[:1]) as exists_mock,\
             patch('os.remove') as remove_mock:

            self.changeset.execute_obsolete_vcs_resources()
            exists_mock.assert_has_calls([
                call(obsolete_paths[0]),
                call(obsolete_paths[1])
            ])
            remove_mock.assert_called_once_with(obsolete_paths[0])
        assert_equal(self.changeset.locales_to_commit, {self.translated_locale})
Prepares a relationship for the tubes.
dataset/ETHPy150Open mozilla/pontoon/pontoon/sync/tests/test_changeset.py/ChangeSetTests.test_obsolete_vcs_resources_paths--crossover with--dataset/ETHPy150Open jarcoal/django-sliver/sliver/views.py/Resource.dehydrate_relationship