def test_formatter(self):
     from ckanext.publicamundi.lib.metadata import formatter_for_field
     x = fixtures.inspire1
     f = x.get_field('spatial_resolution')
     fo = formatter_for_field(f, 'markup')
     s = fo.format()
     return [unicode(s)]
Exemple #2
0
 def test_formatter(self):
     from ckanext.publicamundi.lib.metadata import formatter_for_field
     x = fixtures.inspire1
     f = x.get_field('spatial_resolution')
     fo = formatter_for_field(f, 'markup')
     s = fo.format()
     return [unicode(s)]
Exemple #3
0
 def _test_field(self, fixture_name, field_name):
     obj = getattr(fixtures, fixture_name)
     field = obj.get_field(field_name)
     formatter = formatter_for_field(field, 'markup')
     verifyObject(IFormatter, formatter) 
     s = formatter.format()
     print ' -- format:markup %s -- ' %(type(field))
     print s