# HG changeset patch # User Sylvain Thénault # Date 1269583072 -3600 # Node ID f7709d28fb793637485d78563d3ae2ca5b85a29f # Parent 30a539c2074d7ef45408df8e1f0012e3c0a4e86c [test] fixes when executed under apycot environment (also added ldap1 to test host /etc/hosts) diff -r 30a539c2074d -r f7709d28fb79 server/test/unittest_hook.py --- a/server/test/unittest_hook.py Thu Mar 25 15:11:44 2010 +0100 +++ b/server/test/unittest_hook.py Fri Mar 26 06:57:52 2010 +0100 @@ -92,19 +92,19 @@ class _Hook(hook.Hook): events = ('before_add_entiti',) ex = self.assertRaises(Exception, self.o.register, _Hook) - self.assertEquals(str(ex), 'bad event before_add_entiti on unittest_hook._Hook') + self.assertEquals(str(ex), 'bad event before_add_entiti on %s._Hook' % __name__) def test_register_bad_hook2(self): class _Hook(hook.Hook): events = None ex = self.assertRaises(Exception, self.o.register, _Hook) - self.assertEquals(str(ex), 'bad .events attribute None on unittest_hook._Hook') + self.assertEquals(str(ex), 'bad .events attribute None on %s._Hook' % __name__) def test_register_bad_hook3(self): class _Hook(hook.Hook): events = 'before_add_entity' ex = self.assertRaises(Exception, self.o.register, _Hook) - self.assertEquals(str(ex), 'bad event b on unittest_hook._Hook') + self.assertEquals(str(ex), 'bad event b on %s._Hook' % __name__) def test_call_hook(self): self.o.register(AddAnyHook) diff -r 30a539c2074d -r f7709d28fb79 server/test/unittest_ldapuser.py --- a/server/test/unittest_ldapuser.py Thu Mar 25 15:11:44 2010 +0100 +++ b/server/test/unittest_ldapuser.py Fri Mar 26 06:57:52 2010 +0100 @@ -15,7 +15,7 @@ from cubicweb.server.sources.ldapuser import * -if socket.gethostbyname('ldap1').startswith('172'): +if '17.1' in socket.gethostbyname('ldap1'): SYT = 'syt' ADIM = 'adim' else: