Browse Source

ContextMock should return self

Ask Solem 9 years ago
parent
commit
6c80ba7b48
1 changed files with 1 additions and 1 deletions
  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."""
     in the class, not just the instance."""
 
 
     def __enter__(self):
     def __enter__(self):
-        pass
+        return self
 
 
     def __exit__(self, *exc_info):
     def __exit__(self, *exc_info):
         pass
         pass