62 self.assertEqual(entity.content, 'the cw web site') |
62 self.assertEqual(entity.content, 'the cw web site') |
63 self.assertEqual(entity.cwuri, 'http://www.cubicweb.org/') |
63 self.assertEqual(entity.cwuri, 'http://www.cubicweb.org/') |
64 self.assertEqual(entity.cw_source[0].name, 'myfeed') |
64 self.assertEqual(entity.cw_source[0].name, 'myfeed') |
65 self.assertEqual(entity.cw_metainformation(), |
65 self.assertEqual(entity.cw_metainformation(), |
66 {'type': 'Card', |
66 {'type': 'Card', |
67 'source': {'uri': 'myfeed', 'type': 'datafeed'}, |
67 'source': {'uri': 'myfeed', 'type': 'datafeed', 'use-cwuri-as-url': True}, |
68 'extid': 'http://www.cubicweb.org/'} |
68 'extid': 'http://www.cubicweb.org/'} |
69 ) |
69 ) |
70 self.assertEqual(entity.absolute_url(), 'extid': 'http://www.cubicweb.org/') |
70 self.assertEqual(entity.absolute_url(), 'http://www.cubicweb.org/') |
71 # test repo cache keys |
71 # test repo cache keys |
72 self.assertEqual(self.repo._type_source_cache[entity.eid], |
72 self.assertEqual(self.repo._type_source_cache[entity.eid], |
73 ('Card', 'system', 'http://www.cubicweb.org/', 'myfeed')) |
73 ('Card', 'system', 'http://www.cubicweb.org/', 'myfeed')) |
74 self.assertEqual(self.repo._extid_cache[('http://www.cubicweb.org/', 'system')], |
74 self.assertEqual(self.repo._extid_cache[('http://www.cubicweb.org/', 'system')], |
75 entity.eid) |
75 entity.eid) |