Skip to content
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

Merged
merged 15 commits into from Oct 9, 2015
Merged

Http not found view #462

merged 15 commits into from Oct 9, 2015

Conversation

mgrbyte
Copy link
Contributor

@mgrbyte mgrbyte commented Sep 29, 2015

@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

  • Added a specific browser test case for HTTPNotFound views.
  • kotti.security.get_user uses unauthenticated_userid to look up the user in the db.
  • kotti.resources.Node now formally implements pyramid.interfaces.ILocation, which provides
    a clean way to test if a context can be used in templates, kotti.templates.TemplateAPI methods (e.g url) and especially in tests.
    Mock/stub objects used as placeholders forcontext must implement ILocation.

Matt Russell added 12 commits September 29, 2015 00:26
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.
@mgrbyte
Copy link
Contributor Author

mgrbyte commented Sep 29, 2015

@davidemoro @disko
In particular I've not used the i18n.sh script in this PR - I'm not sure what to do with its output.
It produces lots of untranslated strings that I have no domain knowledge/tool (besides google translate!)

@disko
Copy link
Member

disko commented Sep 29, 2015 via email

@mgrbyte
Copy link
Contributor Author

mgrbyte commented Sep 30, 2015

@disko let me know if there's anything more I can do here

@disko
Copy link
Member

disko commented Oct 9, 2015

@mgrbyte Sorry for getting back so late on this. Could you please rebase the branch, so that it can be merged? TIA!

@disko
Copy link
Member

disko commented Oct 9, 2015

Great job, thanks a lot. Now add a line to CHANGES.txt and we're good to merge :).

(please append [ci skip] to the commit message to not trigger a new Travis build)

[ci skip]
disko added a commit that referenced this pull request Oct 9, 2015
@disko disko merged commit b044320 into Kotti:master Oct 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants