[Checkins] SVN: grokui.base/trunk/src/grokui/base/tests/ Just remove the duplicated tests.
Souheil CHELFOUH
souheil at chelfouh.com
Tue Feb 23 03:17:11 EST 2010
Log message for revision 109351:
Just remove the duplicated tests.
Changed:
D grokui.base/trunk/src/grokui/base/tests/layout.py
D grokui.base/trunk/src/grokui/base/tests/test_grokuibase.py
-=-
Deleted: grokui.base/trunk/src/grokui/base/tests/layout.py
===================================================================
--- grokui.base/trunk/src/grokui/base/tests/layout.py 2010-02-23 03:06:46 UTC (rev 109350)
+++ grokui.base/trunk/src/grokui/base/tests/layout.py 2010-02-23 08:17:11 UTC (rev 109351)
@@ -1,87 +0,0 @@
-"""
-Building panels using `GrokUIView`
-===================================
-
-:doctest:
-:layer: grokui.base.tests.test_grokuibase.FunctionalLayer
-
-We create a browser to watch our views:
-
- >>> from zope.testbrowser.testing import Browser
- >>> browser = Browser()
- >>> browser.addHeader('Authorization', 'Basic mgr:mgrpw')
- >>> browser.handleErrors = False
-
-To create a view that automatically comes with the GrokUI layout, we
-can derive from `grokui.base.AdminView`.
-
-Instances of `AdminView` are in fact `megrok.layout.Page` instances
-that render the content provided by a template or `render` method
-into a given layout.
-
-When we render PlainAdminView, we will get a complete Grok UI page
-with the contents delivered by the `render()` method inserted:
-
- >>> browser.open('http://localhost/++grokui++/caveview')
- >>> print browser.contents
- <html xmlns="http://www.w3.org/1999/xhtml">
- ...
- <title>Grok User Interface</title>
- ...
- <BLANKLINE>
- <div id="grokui-content">Hello from CaveAdminView</div>
- <BLANKLINE>
- ...
- </html>
-
-We also provided a ``title`` with our page. Therefore we will get an
-entry in the navigation bar:
-
- >>> print browser.contents
- <html xmlns="http://www.w3.org/1999/xhtml">
- ...
- <ul id="grokui-menu-entries">
- <li>
- <a href="http://localhost/++grokui++/caveview"
- title="cave management">cave management</a>
- </li>
- </ul>
- ...
- </html>
-
-"""
-import grok
-from grokui.base import GrokUIView
-
-class CaveAdminView(GrokUIView):
- """An admin page to administer caves.
- """
- grok.name('caveview')
- # This title will appear in the navigation bar:
- grok.title('cave management')
- def render(self):
- """This will go into a standard Grok UI page.
- """
- return u'Hello from CaveAdminView'
-
-
-import z3c.testsetup
-import os.path
-import grokui.base
-import unittest
-from zope.app.testing import functional
-from zope.app.testing.functional import ZCMLLayer
-
-ftesting_zcml = os.path.join(
- os.path.dirname(__file__), 'ftesting.zcml')
-FunctionalLayer = functional.ZCMLLayer(
- ftesting_zcml, __name__, 'GrokUIBaseFunctionalLayer', allow_teardown=True)
-
-
-def test_suite():
- suite = unittest.TestSuite()
- test = functional.functionalDocTestSuite(
- optionflags=doctest.ELLIPSIS+doctest.NORMALIZE_WHITESPACE)
- test.layer = FunctionalLayer
- suite.addTest(test)
- return suite
Deleted: grokui.base/trunk/src/grokui/base/tests/test_grokuibase.py
===================================================================
--- grokui.base/trunk/src/grokui/base/tests/test_grokuibase.py 2010-02-23 03:06:46 UTC (rev 109350)
+++ grokui.base/trunk/src/grokui/base/tests/test_grokuibase.py 2010-02-23 08:17:11 UTC (rev 109351)
@@ -1,12 +0,0 @@
-import z3c.testsetup
-import os.path
-import grokui.base
-from zope.app.testing.functional import ZCMLLayer
-
-ftesting_zcml = os.path.join(
- os.path.dirname(grokui.base.__file__), 'ftesting.zcml')
-FunctionalLayer = ZCMLLayer(ftesting_zcml, __name__,
- 'GrokUIBaseFunctionalLayer',
- allow_teardown=True)
-
-test_suite = z3c.testsetup.register_all_tests('grokui.base')
More information about the checkins
mailing list