diff --git a/gluon/tests/test_html.py b/gluon/tests/test_html.py index 4834c1d1..da1b604d 100644 --- a/gluon/tests/test_html.py +++ b/gluon/tests/test_html.py @@ -363,6 +363,13 @@ class TestBareHelpers(unittest.TestCase): A('a', callback='b', _id='c').xml(), 'a' ) + # Callback with no id trigger web2py_uuid() call + from html import web2pyHTMLParser + a = A('a', callback='b').xml() + for tag in web2pyHTMLParser(a).tree.elements('a'): + uuid_generated = tag.attributes['_id'] + self.assertEqual(a, + 'a'.format(id=uuid_generated)) self.assertEqual( A('a', delete='tr').xml(), 'a' @@ -485,6 +492,8 @@ class TestBareHelpers(unittest.TestCase): # with self.assertRaises(SyntaxError) as cm: # COL('<>').xml() # self.assertEqual(cm.exception[0], '
<>
') self.assertEqual(MARKMIN("``hello_world = 'Hello World!'``:python").xml(), 'hello_world = \'Hello World!\'')
+ self.assertEqual(MARKMIN('<>').flatten(), '<>')
def test_ASSIGNJS(self):
# empty assignation