Author: ianb
Date: 2008-11-14 16:25:49 -0700 (Fri, 14 Nov 2008)
New Revision: 3656
Modified:
FormEncode/trunk/formencode/htmlfill.py
FormEncode/trunk/tests/test_htmlfill.py
Log:
Fixed htmlliteral.__repr__, added test for htmlliteral
Modified: FormEncode/trunk/formencode/htmlfill.py
===================================================================
--- FormEncode/trunk/formencode/htmlfill.py 2008-11-14 23:21:26 UTC (rev
3655)
+++ FormEncode/trunk/formencode/htmlfill.py 2008-11-14 23:25:49 UTC (rev
3656)
@@ -96,7 +96,8 @@
return self.text
def __repr__(self):
- return '<%s html=%r text=%r>' % (self.html, self.text)
+ return '<%s html=%r text=%r>' % (
+ self.__class__.__name__, self.html, self.text)
def __html__(self):
return self.html
Modified: FormEncode/trunk/tests/test_htmlfill.py
===================================================================
--- FormEncode/trunk/tests/test_htmlfill.py 2008-11-14 23:21:26 UTC (rev
3655)
+++ FormEncode/trunk/tests/test_htmlfill.py 2008-11-14 23:25:49 UTC (rev
3656)
@@ -119,3 +119,7 @@
errors={'field1': 'foo'}, auto_insert_errors=False)
== 'errors')
+def test_literal():
+ assert (htmlfill.render('<form:error name="foo" />',
+ errors={'foo': htmlfill.htmlliteral('<test>')})
+ == '<span class="error-message"><test></span><br />\n')
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
FormEncode-CVS mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/formencode-cvs