def testTag(self): """ """ # We need that, sinc eabsolute_url is not implemented yet. def absolute_url(): return '/img' image = Image() fe = ImageData() fe.context = image fe.request = None fe.absolute_url = absolute_url self.assertEqual(fe.tag(), '<img src="/img" alt="" height="-1" width="-1" border="0" />') self.assertEqual(fe.tag(alt="Test Image"), '<img src="/img" alt="Test Image" ' 'height="-1" width="-1" border="0" />') self.assertEqual(fe.tag(height=100, width=100), '<img src="/img" alt="" height="100" width="100" border="0" />') self.assertEqual(fe.tag(border=1), '<img src="/img" alt="" height="-1" width="-1" border="1" />') self.assertEqual(fe.tag(css_class="Image"), '<img src="/img" alt="" ' 'height="-1" width="-1" border="0" class="Image" />') self.assertEqual(fe.tag(height=100, width="100", border=1, css_class="Image"), '<img src="/img" alt="" ' 'height="100" width="100" class="Image" border="1" />')