test/unittest_migration.py
changeset 6631 26c303c3f1aa
parent 6340 470d8e828fda
child 7078 bad26a22fe29
--- a/test/unittest_migration.py	Mon Oct 25 16:28:05 2010 +0200
+++ b/test/unittest_migration.py	Mon Oct 25 17:15:46 2010 +0200
@@ -15,11 +15,9 @@
 #
 # You should have received a copy of the GNU Lesser General Public License along
 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
-"""cubicweb.migration unit tests
+"""cubicweb.migration unit tests"""
 
-"""
-
-from os.path import abspath
+from os.path import abspath, dirname, join
 from logilab.common.testlib import TestCase, unittest_main
 
 from cubicweb.devtools import TestServerConfiguration
@@ -32,8 +30,8 @@
     def has_entity(self, e_type):
         return self.has_key(e_type)
 
-SMIGRDIR = abspath('data/server_migration') + '/'
-TMIGRDIR = abspath('data/migration') + '/'
+SMIGRDIR = join(dirname(__file__), 'data', 'server_migration') + '/'
+TMIGRDIR = join(dirname(__file__), 'data', 'migration') + '/'
 
 class MigrTestConfig(TestServerConfiguration):
     verbosity = 0
@@ -105,7 +103,7 @@
 
     def test_db_creation(self):
         """make sure database can be created"""
-        config = ApptestConfiguration('data')
+        config = ApptestConfiguration('data', apphome=self.datadir)
         source = config.sources()['system']
         self.assertEqual(source['db-driver'], 'sqlite')
         cleanup_sqlite(source['db-name'], removetemplate=True)