From 26227cfe53f8fd4bc1631d8e1b35031f589682dc Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 15 Jan 2012 15:55:19 +0100 Subject: backend + api test case, nicer format for plugin tester --- tests/helper/Stubs.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'tests/helper/Stubs.py') 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 -- cgit v1.2.3