diff --git a/heatherr/checkin/tasks.py b/heatherr/checkin/tasks.py index c87ba1c..50bea8c 100644 --- a/heatherr/checkin/tasks.py +++ b/heatherr/checkin/tasks.py @@ -1,6 +1,5 @@ from heatherr import celery_app from heatherr.models import SlackAccount -from heatherr.checkin.models import Checkin @celery_app.task(ignore_result=True) @@ -9,6 +8,7 @@ def check_all_checkins(): for slackaccount in slackaccounts: check_slackaccount_checkins(slackaccount) + def check_slackaccount_checkins(slackaccount): users = slackaccount.get_users() requireds = [checkin @@ -17,6 +17,7 @@ def check_slackaccount_checkins(slackaccount): for checkin in requireds: check_checkin(checkin) + def check_checkin(checkin): # At this point we need to get more oAuth scopes because incoming # webhook URLs cannot do private messages. diff --git a/heatherr/checkin/tests/test_commands.py b/heatherr/checkin/tests/test_commands.py index ad8e8a6..c0be8fc 100644 --- a/heatherr/checkin/tests/test_commands.py +++ b/heatherr/checkin/tests/test_commands.py @@ -1,5 +1,3 @@ -import responses - from heatherr.tests import CommandTestCase from heatherr.checkin.models import Checkin diff --git a/heatherr/checkin/tests/test_models.py b/heatherr/checkin/tests/test_models.py index 8dc0e18..b07b681 100644 --- a/heatherr/checkin/tests/test_models.py +++ b/heatherr/checkin/tests/test_models.py @@ -4,7 +4,6 @@ from django.utils import timezone -import arrow import responses from freezegun import freeze_time diff --git a/heatherr/tests/base.py b/heatherr/tests/base.py index 60409a5..4274676 100644 --- a/heatherr/tests/base.py +++ b/heatherr/tests/base.py @@ -31,6 +31,7 @@ def mock_api_call(self, method, data): responses.POST, 'https://slack.com/api/%s' % (method,), json=data) + class CommandTestCase(HeatherrTestCase): default_user_id = 'user_id' diff --git a/setup.cfg b/setup.cfg index d6c3c41..51389bd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [flake8] -ignore = F403 +ignore = F403,E402 exclude = ve,**/migrations/*,local_settings.py [pytest]