Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Commit

Permalink
Add test for silly bug in object traverser.
Browse files Browse the repository at this point in the history
  • Loading branch information
ulif committed Feb 14, 2010
1 parent b6027aa commit 1102f82
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/grokui/admin/tests/objectbrowser.py
Expand Up @@ -130,7 +130,29 @@
... <a href="http://localhost/docgrok-obj/data/@@inspect.html">&lt;BTrees.OOBTree.OOBTree object at ...&gt;</a>
... </div>
...
Traversing objects whose boolean value evaluates to ``False``
-------------------------------------------------------------
Due to a faulty traverser in former versions objects which evaluated
to ``False`` when 'booleanized', empty containers for example, one
could not browse those object.
When we create an empty container:
>>> import grok
>>> mycontainer = grok.Container()
>>> getRootFolder()['mycontainer'] = mycontainer
>>> bool(mycontainer)
False
we can browse it now:
>>> browser.open('http://localhost/docgrok-obj/mycontainer/@@inspect.html')
>>> print browser.contents
<html xmlns="http://www.w3.org/1999/xhtml">
...<span>mycontainer</span>
...<span>...<a ...>Container</a> object at 0x...</span>...
"""

0 comments on commit 1102f82

Please sign in to comment.