devtools/testlib.py
branchstable
changeset 6585 9af22f2c0c4c
parent 6469 82cf41ae8b89
child 6586 207dc5111af2
child 6587 0bf81efd55f9
--- a/devtools/testlib.py	Thu Oct 21 09:34:21 2010 +0200
+++ b/devtools/testlib.py	Fri Oct 22 13:10:27 2010 +0200
@@ -24,8 +24,9 @@
 import os
 import sys
 import re
+import urlparse
+from os.path import dirname
 from urllib import unquote
-import urlparse
 from math import log
 from contextlib import contextmanager
 from warnings import warn
@@ -198,7 +199,9 @@
         try:
             return cls.__dict__['_config']
         except KeyError:
-            config = cls._config = cls.configcls(cls.appid)
+            home = join(dirname(sys.modules[self.__class__.__module__].__file__),
+                        cls.appid)
+            config = cls._config = cls.configcls(cls.appid, apphome=home)
             config.mode = 'test'
             return config