django test fix attempt 2

This commit is contained in:
wh1te909 2020-06-15 10:18:48 +00:00
parent 86c436e0ea
commit 97a95541a3
2 changed files with 6 additions and 1 deletions

View File

@ -17,6 +17,10 @@ app.result_backend = "redis://" + settings.REDIS_HOST + ":6379"
app.accept_content = ["application/json"]
app.result_serializer = "json"
app.task_serializer = "json"
if "TRAVIS" in os.environ:
app.task_always_eager = True
app.conf.task_track_started = True
app.autodiscover_tasks()

View File

@ -14,7 +14,8 @@ from automation.models import Policy
from core.models import CoreSettings
from checks.models import Check
@patch('automation.tasks.generate_agent_checks_from_policies_task.delay')
# @patch("automation.tasks.generate_agent_checks_from_policies_task.delay")
class BaseTestCase(TestCase):
def setUp(self):