[Checkins] SVN: zc.extjs/branches/dev/src/zc/extjs/form.py Expanded assertion that tests for AJAX widgets.

Gintautas Miliauskas gintas at pov.lt
Mon Mar 31 18:40:04 EDT 2008


Log message for revision 85048:
  Expanded assertion that tests for AJAX widgets.
  
  The assertion is useful because it points more directly to the cause
  of the problem (the field) rather than a RandomComplexInputWidget that
  the adapter lookup happened to dig up.
  

Changed:
  U   zc.extjs/branches/dev/src/zc/extjs/form.py

-=-
Modified: zc.extjs/branches/dev/src/zc/extjs/form.py
===================================================================
--- zc.extjs/branches/dev/src/zc/extjs/form.py	2008-03-31 22:34:47 UTC (rev 85047)
+++ zc.extjs/branches/dev/src/zc/extjs/form.py	2008-03-31 22:40:03 UTC (rev 85048)
@@ -63,9 +63,9 @@
             ignore_request=True)
 
         for widget in widgets:
-            # A programmer's check to make sure that we have the right
-            # type of widget.
-            assert hasattr(widget, 'js_config'), widget.name
+            # Make sure that we have the right type of widget.
+            assert hasattr(widget, 'js_config'), (
+                    'Could not find an Ext widget for %r' % widget.name)
 
         return dict(
             widgets=[widget.js_config() for widget in widgets],



More information about the Checkins mailing list