[Checkins] SVN: megrok.z3cform/branches/megrok.z3cfrom-layout/ More Tests

Christian Klinger cklinger at novareto.de
Mon Jul 6 04:18:53 EDT 2009


Log message for revision 101607:
  More Tests

Changed:
  U   megrok.z3cform/branches/megrok.z3cfrom-layout/buildout.cfg
  A   megrok.z3cform/branches/megrok.z3cfrom-layout/src/megrok/z3cform/tests/test_utils.py
  U   megrok.z3cform/branches/megrok.z3cfrom-layout/versions.cfg

-=-
Modified: megrok.z3cform/branches/megrok.z3cfrom-layout/buildout.cfg
===================================================================
--- megrok.z3cform/branches/megrok.z3cfrom-layout/buildout.cfg	2009-07-06 06:57:38 UTC (rev 101606)
+++ megrok.z3cform/branches/megrok.z3cfrom-layout/buildout.cfg	2009-07-06 08:18:53 UTC (rev 101607)
@@ -8,4 +8,4 @@
 [test]
 recipe = zc.recipe.testrunner
 eggs = megrok.z3cform [test]
-defaults = ['--tests-pattern', '^f?tests$', '-v']
+defaults = ['--tests-pattern', '^f?tests$', '-v', '-c']

Added: megrok.z3cform/branches/megrok.z3cfrom-layout/src/megrok/z3cform/tests/test_utils.py
===================================================================
--- megrok.z3cform/branches/megrok.z3cfrom-layout/src/megrok/z3cform/tests/test_utils.py	                        (rev 0)
+++ megrok.z3cform/branches/megrok.z3cfrom-layout/src/megrok/z3cform/tests/test_utils.py	2009-07-06 08:18:53 UTC (rev 101607)
@@ -0,0 +1,38 @@
+"""
+  >>> person = Person()
+  >>> IPerson.providedBy(person)
+  True
+  >>> person.name = u"christian"
+  >>> from zope.lifecycleevent import Attributes
+  >>> grok.notify(grok.ObjectModifiedEvent(person, *[Attributes(IPerson, 'name')]))
+  An IObjectModifiedEvent was sent for a person with the following changes:
+  name  
+  
+"""
+import grok
+from zope.interface import Interface
+from zope.schema import TextLine 
+
+class IPerson(Interface):
+    name = TextLine(title=u"Name")
+
+class Person(grok.Model):
+    grok.implements(IPerson)
+
+    name = u""
+
+
+ at grok.subscribe(IPerson, grok.IObjectModifiedEvent)
+def onNameChange(context, event):
+    print ("An IObjectModifiedEvent was sent for a person with the "
+           "following changes:")
+    for descr in event.descriptions:
+        print ", ".join(descr.attributes)
+
+
+def test_suite():
+    from zope.testing import doctest
+    from megrok.z3cform.tests import FunctionalLayer
+    suite = doctest.DocTestSuite(optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS)
+    suite.layer = FunctionalLayer
+    return suite

Modified: megrok.z3cform/branches/megrok.z3cfrom-layout/versions.cfg
===================================================================
--- megrok.z3cform/branches/megrok.z3cfrom-layout/versions.cfg	2009-07-06 06:57:38 UTC (rev 101606)
+++ megrok.z3cform/branches/megrok.z3cfrom-layout/versions.cfg	2009-07-06 08:18:53 UTC (rev 101607)
@@ -1,109 +1,115 @@
 [versions]
+zope.container = 3.8.1
+grok = 1.0a4
 ClientForm = 0.2.9
-Pygments = 0.8.1
-RestrictedPython = 3.4.2
-ZConfig = 2.5.1
-ZODB3 = 3.8
 docutils = 0.4
-grokcore.component = 1.5.1
+grokcore.component = 1.6
+grokcore.formlib = 1.1
 grokcore.security = 1.0
-grokcore.view = 1.1
-martian = 0.10
+grokcore.view = 1.7
+grokcore.viewlet = 1.0
+grokui.admin = 0.3.2
+martian = 0.11
 mechanize = 0.1.7b
+Pygments = 0.8.1
 pytz = 2007k
+RestrictedPython = 3.4.2
 simplejson = 1.7.1
 z3c.autoinclude = 0.2.2
 z3c.flashmessage = 1.0
 z3c.testsetup = 0.2.1
-zc.catalog = 1.2
+zc.catalog = 1.2.0
+ZConfig = 2.5.1
 zc.recipe.testrunner = 1.0.0
-zdaemon = 2.0.1
-zodbcode = 3.4
-zope.annotation = 3.4
+zdaemon = 2.0.2
+ZODB3 = 3.8.1
+zodbcode = 3.4.0
+zope.annotation = 3.4.1
 zope.app.apidoc = 3.4.3
 zope.app.applicationcontrol = 3.4.3
 zope.app.appsetup = 3.4.1
-zope.app.authentication = 3.4.1
-zope.app.basicskin = 3.4
-zope.app.broken = 3.4
+zope.app.authentication = 3.4.4
+zope.app.basicskin = 3.4.0
+zope.app.broken = 3.4.0
 zope.app.catalog = 3.5.1
 zope.app.component = 3.4.1
-zope.app.container = 3.5.3
-zope.app.content = 3.4
+zope.app.container = 3.5.6
+zope.app.content = 3.4.0
 zope.app.debug = 3.4.1
-zope.app.dependable = 3.4
+zope.app.dependable = 3.4.0
 zope.app.error = 3.5.1
 zope.app.exception = 3.4.1
-zope.app.file = 3.4.2
-zope.app.folder = 3.4
+zope.app.file = 3.4.4
+zope.app.folder = 3.4.0
 zope.app.form = 3.4.1
 zope.app.generations = 3.4.1
 zope.app.http = 3.4.1
 zope.app.i18n = 3.4.4
-zope.app.interface = 3.4
+zope.app.interface = 3.4.0
 zope.app.intid = 3.4.1
 zope.app.keyreference = 3.4.1
-zope.app.locales = 3.4.1
+zope.app.locales = 3.4.5
 zope.app.onlinehelp = 3.4.1
 zope.app.pagetemplate = 3.4.1
 zope.app.preference = 3.4.1
-zope.app.principalannotation = 3.4
+zope.app.principalannotation = 3.4.0
 zope.app.publication = 3.4.3
-zope.app.publisher = 3.4.1
-zope.app.renderer = 3.4
+zope.app.publisher = 3.5.1
+zope.app.renderer = 3.4.0
 zope.app.rotterdam = 3.4.1
-zope.app.schema = 3.4
+zope.app.schema = 3.4.0
 zope.app.security = 3.5.2
 zope.app.securitypolicy = 3.4.6
-zope.app.server = 3.4
+zope.app.server = 3.4.2
 zope.app.session = 3.5.1
-zope.app.skins = 3.4
+zope.app.skins = 3.4.0
 zope.app.testing = 3.4.3
-zope.app.tree = 3.4
+zope.app.tree = 3.4.0
 zope.app.twisted = 3.4.1
 zope.app.wsgi = 3.4.1
-zope.app.zapi = 3.4
+zope.app.zapi = 3.4.0
 zope.app.zcmlfiles = 3.4.3
-zope.app.zopeappgenerations = 3.4
-zope.cachedescriptors = 3.4
-zope.component = 3.4
-zope.configuration = 3.4
-zope.contentprovider = 3.4
-zope.contenttype = 3.4
-zope.copypastemove = 3.4
-zope.datetime = 3.4
-zope.deferredimport = 3.4
-zope.deprecation = 3.4
+zope.app.zopeappgenerations = 3.4.0
+zope.cachedescriptors = 3.4.1
+zope.component = 3.4.0
+zope.configuration = 3.4.0
+zope.contentprovider = 3.4.0
+zope.contenttype = 3.4.0
+zope.copypastemove = 3.4.0
+zope.datetime = 3.4.0
+zope.deferredimport = 3.4.0
+zope.deprecation = 3.4.0
 zope.dottedname = 3.4.2
-zope.dublincore = 3.4
+zope.dublincore = 3.4.0
 zope.error = 3.5.1
-zope.event = 3.4
-zope.exceptions = 3.4
-zope.filerepresentation = 3.4
-zope.formlib = 3.4
-zope.hookable = 3.4
-zope.i18n = 3.4
+zope.event = 3.4.0
+zope.exceptions = 3.4.0
+zope.filerepresentation = 3.4.0
+zope.formlib = 3.4.0
+zope.hookable = 3.4.0
+zope.i18n = 3.4.0
 zope.i18nmessageid = 3.4.3
 zope.index = 3.4.1
 zope.interface = 3.4.1
-zope.lifecycleevent = 3.4
-zope.location = 3.4
-zope.minmax = 1.1
-zope.modulealias = 3.4
-zope.pagetemplate = 3.4
-zope.proxy = 3.4
-zope.publisher = 3.4.3
-zope.schema = 3.4
-zope.security = 3.4
-zope.securitypolicy = 3.4
-zope.server = 3.4.2
+zope.lifecycleevent = 3.4.0
+zope.location = 3.4.0
+zope.minmax = 1.1.0
+zope.modulealias = 3.4.0
+zope.pagetemplate = 3.4.0
+zope.proxy = 3.4.2
+zope.publisher = 3.4.6
+zope.schema = 3.4.0
+zope.security = 3.4.1
+zope.securitypolicy = 3.4.1
+zope.server = 3.4.3
 zope.session = 3.4.1
-zope.size = 3.4
-zope.structuredtext = 3.4
+zope.size = 3.4.0
+zope.structuredtext = 3.4.0
 zope.tal = 3.4.1
-zope.tales = 3.4
+zope.tales = 3.4.0
 zope.testbrowser = 3.4.2
-zope.testing = 3.5.4
+zope.testing = 3.6.0
 zope.thread = 3.4
 zope.traversing = 3.4.1
 zope.viewlet = 3.4.2
+



More information about the Checkins mailing list