Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed test_transform.py after merging the hotfix.
Problem is that `test_transforms.setUp` sets `settings.rules` to `python://plone.app.theming/tests/rules.xml`. The PythonResolver translates this to an absolute file system path like `/Users/maurits/.../src/plone/app/theming/tests/rules.xml`. The rules file has `<theme href="theme.html" />`. This becomes an absolute file system path like `/Users/maurits/.../src/plone/app/theming/tests/theme.html`. And then the FailingFileSystemResolver of the hotfix kicks in and throws an error: File system access not allowed: '/Users/maurits/.../src/plone/app/theming/tests/theme.html' At this point in the diazo code, the absolute prefix is not used, so you cannot fix it with that. The main fix in this commit is letting `rules.xml` reference the theme as `python://plone.app.theming/tests/theme.html`. Then it works again. This was a problem in the tests, but it may happen for real. But I found this hard to reproduce. I tried using `python://plonetheme.barceloneta/theme/rules.xml` in the theming controlpanel, but even without the hotfix this meant the theme could not be displayed. I have not heard anyone complain that theming fails with the hotfix, so maybe no one is using the `python://` path for the rules. This commit removes test_internal_resolver, because this did not actually test the internal resolver. It created an XMLParser with an InternalResolver, but this was not needed: neither the rules nor the theme contained anything that needed to be resolved internally (traversed within the Plone Site). The internal resolver is already tested in the test_includes method.
- Loading branch information