浏览代码

ContextMock should return self

Ask Solem 9 年之前
父节点
当前提交
6c80ba7b48
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      celery/tests/case.py

+ 1 - 1
celery/tests/case.py

@@ -149,7 +149,7 @@ class _ContextMock(Mock):
     in the class, not just the instance."""
 
     def __enter__(self):
-        pass
+        return self
 
     def __exit__(self, *exc_info):
         pass