From 990474216fd4cf8562e18825f9d18ed38053a338 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Mon, 15 Jun 2020 17:20:11 +0000 Subject: [PATCH] fix django tests in travis by adding redis service --- .travis.yml | 2 ++ api/tacticalrmm/tacticalrmm/celery.py | 4 ---- api/tacticalrmm/tacticalrmm/test.py | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5abcf999..24baf196 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ matrix: python: "3.7" services: - postgresql + - redis before_script: - psql -c 'CREATE DATABASE travisci;' -U postgres @@ -36,6 +37,7 @@ matrix: python: "3.8" services: - postgresql + - redis before_script: - psql -c 'CREATE DATABASE travisci;' -U postgres diff --git a/api/tacticalrmm/tacticalrmm/celery.py b/api/tacticalrmm/tacticalrmm/celery.py index 0d0b1441..2c8ccb04 100644 --- a/api/tacticalrmm/tacticalrmm/celery.py +++ b/api/tacticalrmm/tacticalrmm/celery.py @@ -17,10 +17,6 @@ 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() diff --git a/api/tacticalrmm/tacticalrmm/test.py b/api/tacticalrmm/tacticalrmm/test.py index 5344a8ab..2aa12fc1 100644 --- a/api/tacticalrmm/tacticalrmm/test.py +++ b/api/tacticalrmm/tacticalrmm/test.py @@ -15,7 +15,6 @@ from core.models import CoreSettings from checks.models import Check -# @patch("automation.tasks.generate_agent_checks_from_policies_task.delay") class BaseTestCase(TestCase): def setUp(self):