From 27542b133c38ef176cf74dbf863401dd8325b4d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9F=E9=85=8C=20=E9=B5=AC=E5=85=84?= Date: Tue, 2 Aug 2022 22:51:38 +0900 Subject: [PATCH] Bypass Celery for UNIT_TEST --- botanjs/service/jwork.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/botanjs/service/jwork.py b/botanjs/service/jwork.py index a0aacc8..6d6c182 100644 --- a/botanjs/service/jwork.py +++ b/botanjs/service/jwork.py @@ -2,7 +2,11 @@ import os from botanjs.classmap import ClassMap -CeleryExists = True +if os.getenv( "UNIT_TEST" ) == "1": + CeleryExists = False +else: + CeleryExists = True + try: from celery import Celery except ImportError: