[test] skip unittest_fti if we don't have the required setup... stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 10 Sep 2010 15:09:26 +0200
branchstable
changeset 6206 d4c73211b0b8
parent 6205 41e0e13e10b7
child 6207 c3f11fadf9ed
[test] skip unittest_fti if we don't have the required setup...
server/test/unittest_fti.py
--- a/server/test/unittest_fti.py	Fri Sep 10 14:50:43 2010 +0200
+++ b/server/test/unittest_fti.py	Fri Sep 10 15:09:26 2010 +0200
@@ -1,5 +1,7 @@
 from __future__ import with_statement
 
+import socket
+
 from cubicweb.devtools import ApptestConfiguration
 from cubicweb.devtools.testlib import CubicWebTC
 from cubicweb.selectors import is_instance
@@ -8,6 +10,11 @@
 class PostgresFTITC(CubicWebTC):
     config = ApptestConfiguration('data', sourcefile='sources_fti')
 
+    def setUp(self):
+        if not socket.gethostname().endswith('.logilab.fr'):
+            self.skip('XXX require logilab configuration')
+        super(PostgresFTITC, self).setUp()
+
     def test_occurence_count(self):
         req = self.request()
         c1 = req.create_entity('Card', title=u'c1',