From 7d7f80c167792745a00f71d347cfe5b28323c02a Mon Sep 17 00:00:00 2001 From: Richard Bullington-McGuire Date: Sun, 1 Dec 2024 00:27:13 -0500 Subject: [PATCH] Make flake8 clean --- .github/workflows/lint.yml | 2 -- setup.py | 5 +---- tests/conftest.py | 4 ---- tests/test_api.py | 4 +--- 4 files changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f929d27..51398ac 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,5 +23,3 @@ jobs: requirements-files: "requirements.txt requirements-test.txt" - name: flake8 Lint uses: py-actions/flake8@v2 - # There are too many errors to start with to fail on this - continue-on-error: true diff --git a/setup.py b/setup.py index 302968c..0fa413f 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,5 @@ +#!/usr/bin/env python3 # -*- coding: utf-8 -*- -import os.path -import re -import warnings - from setuptools import setup version = "0.3.6" diff --git a/tests/conftest.py b/tests/conftest.py index 3b97d4a..265abb9 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,11 +1,7 @@ -import json - import pytest -import pytest_mock from falcon import testing from freezing.nq.app import make_app -from freezing.nq.config import config from freezing.nq.publish import ActivityPublisher diff --git a/tests/test_api.py b/tests/test_api.py index 9c01ece..ed2b0ab 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -1,9 +1,6 @@ -import copy import json import arrow -import falcon -import pytest from freezing.model.msg.mq import ActivityUpdate, DefinedTubes from freezing.model.msg.strava import AspectType @@ -44,6 +41,7 @@ def test_post_webhook(client, publisher: ActivityPublisher): result = client.simulate_post( "/webhook", body=json.dumps(d), headers={"content-type": "application/json"} ) + assert result.status_code == 200 message = ActivityUpdate() message.athlete_id = d["owner_id"]