Private
Public Access
1
0

mocking myqueue in most tests

This commit is contained in:
Sander Roosendaal
2019-02-10 15:54:09 +01:00
parent 9ec2b06338
commit 5becabb216
15 changed files with 75 additions and 11 deletions

View File

@@ -287,6 +287,17 @@ def isbreakthrough(delta,cpvalues,p0,p1,p2,p3,ratio):
def myqueue(queue,function,*args,**kwargs):
class MockJob:
def __init__(self,*args, **kwargs):
self.result = 1
self.id = 1
def revoke(self):
return 1
if settings.TESTING:
return MockJob()
if settings.DEBUG:
kwargs['debug'] = True