New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Http not found view #462
Http not found view #462
Conversation
`kotti.security.get_user`.
Fixes issues with tests failing with a dummy root context, which is not a kotti.resources.Node. * Declare `kotti.resources.Node` implements `pyrmaid.interfaces.ILocation` * Add a Template API `is_location(context)` * Use the `is_location` API in master/edit/view templates to switch. Context objects under test must implement ILocation.
@davidemoro @disko |
On 29 Sep 2015, at 3:25, Matt Russell wrote:
I've not used the `i18n.sh` script in this PR
Please just run it and include at least the updated .pot and .po files
in the PR.
|
@disko let me know if there's anything more I can do here |
@mgrbyte Sorry for getting back so late on this. Could you please rebase the branch, so that it can be merged? TIA! |
Great job, thanks a lot. Now add a line to (please append |
[ci skip]
@disko @davidemoro
First stab at implementing #459.
Since this is my first PR of substance, I expect there may be one or two things not quite to your liking.
It turned out to be more complex that I first thought, particularly getting browser doc-tests working)
Summary
kotti.security.get_user
usesunauthenticated_userid
to look up the user in the db.kotti.resources.Node
now formally implementspyramid.interfaces.ILocation
, which providesa clean way to test if a context can be used in templates,
kotti.templates.TemplateAPI
methods (e.gurl
) and especially in tests.Mock/stub objects used as placeholders for
context
must implement ILocation.