diff options
Diffstat (limited to 'tests/helper')
-rw-r--r-- | tests/helper/PluginTester.py | 4 | ||||
-rw-r--r-- | tests/helper/Stubs.py | 9 |
2 files changed, 6 insertions, 7 deletions
diff --git a/tests/helper/PluginTester.py b/tests/helper/PluginTester.py index db01a2d06..b70c0d061 100644 --- a/tests/helper/PluginTester.py +++ b/tests/helper/PluginTester.py @@ -128,14 +128,14 @@ class PluginTester(TestCase): @classmethod def setUpClass(cls): cls.core = Core() - name = "%s.%s" % (cls.__name__, cls.__name__) + name = "%s.%s" % (cls.__module__, cls.__name__) for f in glob(join(name, "debug_*")): remove(f) # Copy debug report to attachment dir for jenkins @classmethod def tearDownClass(cls): - name = "%s.%s" % (cls.__name__, cls.__name__) + name = "%s.%s" % (cls.__module__, cls.__name__) if not exists(name): makedirs(name) for f in glob("debug_*"): move(f, join(name, f)) diff --git a/tests/helper/Stubs.py b/tests/helper/Stubs.py index eb3cc98c1..cfa5d6fdb 100644 --- a/tests/helper/Stubs.py +++ b/tests/helper/Stubs.py @@ -66,7 +66,7 @@ class Core: self.requestFactory = RequestFactory(self) __builtin__.pyreq = self.requestFactory self.accountManager = AccountManager() - self.hookManager = self.eventManager = self.interActionManager = NopClass() + self.hookManager = self.eventManager = self.interActionManager = NoopClass() self.js = JsEngine() self.cache = {} self.packageCache = {} @@ -89,8 +89,7 @@ class Core: return PyPackage(self, 0, "tmp", "tmp", "", "", 0, 0) - -class NopClass: +class NoopClass: def __getattr__(self, item): return noop @@ -114,6 +113,6 @@ class Thread(BaseThread): return dump __builtin__._ = lambda x: x -__builtin__.pypath = "" -__builtin__.hookManager = NopClass() +__builtin__.pypath = abspath(join(dirname(__file__), "..", "..")) +__builtin__.hookManager = NoopClass() __builtin__.pyreq = None
\ No newline at end of file |