Repository navigation
More fixes for creating the site and running tests - #2
Merged
Merged
Conversation
Sneaky: even with `DELETE_SITE=1` and after `make stack-remove-data`, this new setting was not picked up in a new `make stack-start`. Why? Because I still had an earlier plone Docker image with the unchanged `create-site.py` script...
When you install `plone.app.caching`, you can go to the Import Settings tab to apply a preconfigured set of caching rules.
This is also what we do in the `create_site.py` script since the previous commit.
Otherwise, so with a plain install of `plone.app.caching` and nothing else, 37 out of 77 tests fail in `make stack-test`:
```
ERROR at setup of test_plone_purges_changed_content[moderate]
request = <SubRequest 'caching_policy' for <Function test_bot_is_tracked[moderate-Claude-User-user]>>, stack = <stack.helpers.Stack object at 0x110018ec0>
@pytest.fixture(scope="session", params=["site", "moderate"])
def caching_policy(request, stack):
"""Run tests with the site's caching policy, and with moderateCaching.
By default Plone does not let Varnish cache pages. With moderateCaching
for pages Varnish caches them for SMAXAGE seconds. The original policy
is restored afterwards.
"""
if request.param == "moderate":
original_mapping = stack.registry_get(OPERATION_MAPPING)
original_smaxage = stack.registry_get(MODERATE_SMAXAGE)
> mapping = dict(original_mapping)
^^^^^^^^^^^^^^^^^^^^^^
E TypeError: 'NoneType' object is not iterable
```
With this small fix in `conftest.py`, those tests pass whether such a preconfigured set of caching rules is applied or not.
These compiled files should not be in git. When you run `make release`, this installs `zest.releaser` and `zest.pocompile`, which makes sure `.mo` files are generated before creating the Python package distribution.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.