summaryrefslogtreecommitdiffstats
path: root/tests/helper/Stubs.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-01-15 15:55:19 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-01-15 15:55:19 +0100
commit26227cfe53f8fd4bc1631d8e1b35031f589682dc (patch)
treed468ab14d8179c9a097c3d388ce29b8ab5747475 /tests/helper/Stubs.py
parentplugin tester links (diff)
downloadpyload-26227cfe53f8fd4bc1631d8e1b35031f589682dc.tar.xz
backend + api test case, nicer format for plugin tester
Diffstat (limited to 'tests/helper/Stubs.py')
-rw-r--r--tests/helper/Stubs.py9
1 files changed, 4 insertions, 5 deletions
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