from functools import partial from itertools import chain, izip from Queue import Empty from mock import Mock, patch from celery.app.registry import TaskRegistry from celery.task.base import Task from celery.utils import timeutils from celery.utils import uuid from celery.worker import buckets from celery.tests.utils import Case, skip_if_environ, mock_context skip_if_disabled = partial(skip_if_environ("SKIP_RLIMITS")) class MockJob(object): def __init__(self, id, name, args, kwargs): self.id = id self.name = name self.args = args self.kwargs = kwargs def __eq__(self, other): if isinstance(other, self.__class__): return bool(self.id == other.id \ and self.name == other.name \ and self.args == other.args \
from functools import partial from itertools import chain, izip from Queue import Empty from mock import Mock, patch from celery.app.registry import TaskRegistry from celery.task.base import Task from celery.utils import timeutils from celery.utils import uuid from celery.worker import buckets from celery.tests.utils import Case, skip_if_environ, mock_context skip_if_disabled = partial(skip_if_environ('SKIP_RLIMITS')) class MockJob(object): def __init__(self, id, name, args, kwargs): self.id = id self.name = name self.args = args self.kwargs = kwargs def __eq__(self, other): if isinstance(other, self.__class__): return bool(self.id == other.id and self.name == other.name and self.args == other.args
sys.path.insert(0, os.getcwd()) import time import unittest2 as unittest from itertools import chain, izip from celery.task.base import Task from celery.utils import timeutils from celery.utils import gen_unique_id from celery.utils.functional import curry from celery.worker import buckets from celery.registry import TaskRegistry from celery.tests.utils import skip_if_environ skip_if_disabled = curry(skip_if_environ("SKIP_RLIMITS")) class MockJob(object): def __init__(self, task_id, task_name, args, kwargs): self.task_id = task_id self.task_name = task_name self.args = args self.kwargs = kwargs def __eq__(self, other): if isinstance(other, self.__class__): return bool(self.task_id == other.task_id \ and self.task_name == other.task_name \ and self.args == other.args \
import sys import time from functools import partial from itertools import chain, izip from celery.registry import TaskRegistry from celery.task.base import Task from celery.utils import timeutils from celery.utils import uuid from celery.worker import buckets from celery.tests.utils import skip_if_environ, unittest skip_if_disabled = partial(skip_if_environ("SKIP_RLIMITS")) class MockJob(object): def __init__(self, task_id, task_name, args, kwargs): self.task_id = task_id self.task_name = task_name self.args = args self.kwargs = kwargs def __eq__(self, other): if isinstance(other, self.__class__): return bool(self.task_id == other.task_id \ and self.task_name == other.task_name \ and self.args == other.args \ and self.kwargs == other.kwargs)
import sys import time import unittest2 as unittest from itertools import chain, izip from celery.registry import TaskRegistry from celery.task.base import Task from celery.utils import timeutils from celery.utils import gen_unique_id from celery.utils.functional import curry from celery.worker import buckets from celery.tests.utils import skip_if_environ skip_if_disabled = curry(skip_if_environ("SKIP_RLIMITS")) class MockJob(object): def __init__(self, task_id, task_name, args, kwargs): self.task_id = task_id self.task_name = task_name self.args = args self.kwargs = kwargs def __eq__(self, other): if isinstance(other, self.__class__): return bool(self.task_id == other.task_id \ and self.task_name == other.task_name \ and self.args == other.args \ and self.kwargs == other.kwargs)