# HG changeset patch # User Nicolas Chauvat # Date 1242948658 -7200 # Node ID 9c96dd7cc6243e679c1b6beb419e86fe2daf4f86 # Parent e23536d29231b0d35e1466b8db8c48f37332720f [tests] fix test after absolute_url got changed for external entities diff -r e23536d29231 -r 9c96dd7cc624 test/unittest_entity.py --- a/test/unittest_entity.py Fri May 22 01:30:20 2009 +0200 +++ b/test/unittest_entity.py Fri May 22 01:30:58 2009 +0200 @@ -374,14 +374,15 @@ self.assertEquals(person.prenom, u'sylvain') self.assertEquals(person.nom, u'thénault') - def test_metainformation(self): + def test_metainformation_and_external_absolute_url(self): note = self.add_entity('Note', type=u'z') metainf = note.metainformation() self.assertEquals(metainf, {'source': {'adapter': 'native', 'uri': 'system'}, 'type': u'Note', 'extid': None}) self.assertEquals(note.absolute_url(), 'http://testing.fr/cubicweb/note/%s' % note.eid) metainf['source'] = metainf['source'].copy() metainf['source']['base-url'] = 'http://cubicweb2.com/' - self.assertEquals(note.absolute_url(), 'http://cubicweb2.com/note/%s' % note.eid) + metainf['extid'] = 1234 + self.assertEquals(note.absolute_url(), 'http://cubicweb2.com/note/1234') if __name__ == '__main__': from logilab.common.testlib import unittest_main