mocking myqueue in most tests
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user