Skip to content

Commit 12a6cdb

Browse files
authored
Fix lint errors and python 2.7 tests (#53)
* Fix isort lint errors in tests/ * Fix py27 requirements
1 parent b8f094b commit 12a6cdb

6 files changed

Lines changed: 10 additions & 4 deletions

File tree

tests/constraints/python-2.7.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pyrsistent<0.17

tests/core/test_logging.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import jsonschema
1212
import pytest
13+
1314
from dockerflow.logging import JsonLogFormatter
1415

1516
logger_name = "tests"

tests/django/test_django.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from django.db import connection
1313
from django.db.utils import OperationalError, ProgrammingError
1414
from django.test.utils import CaptureQueriesContext
15+
1516
from dockerflow import health
1617
from dockerflow.django import checks
1718
from dockerflow.django.middleware import DockerflowMiddleware

tests/flask/test_flask.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
import pytest
99
import redis
10-
from dockerflow import health
11-
from dockerflow.flask import Dockerflow, checks
1210
from fakeredis import FakeStrictRedis
1311
from flask import Flask, Response, g, has_request_context, request
1412
from flask_login import LoginManager, current_user, login_user
@@ -18,6 +16,9 @@
1816
from flask_sqlalchemy import SQLAlchemy, get_debug_queries
1917
from sqlalchemy.exc import DBAPIError, SQLAlchemyError
2018

19+
from dockerflow import health
20+
from dockerflow.flask import Dockerflow, checks
21+
2122

2223
class MockUser(UserMixin):
2324
def __init__(self, id):

tests/sanic/test_sanic.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
import pytest
1010
import sanic.testing
1111
import sanic_redis.core
12-
from dockerflow import health
13-
from dockerflow.sanic import Dockerflow, checks
1412
from sanic import Sanic, response
1513
from sanic_redis import SanicRedis
1614

15+
from dockerflow import health
16+
from dockerflow.sanic import Dockerflow, checks
17+
1718

1819
class FakeRedis:
1920
def __init__(self, error=None, **kw):

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ deps =
3636
fl012: -ctests/constraints/flask-0.12.txt
3737
fl10: -ctests/constraints/flask-1.0.txt
3838
s19: -ctests/constraints/sanic-19.txt
39+
py27: -ctests/constraints/python-2.7.txt
3940
commands =
4041
python --version
4142
dj{111,21,22,30}-tests: pytest tests/core/ tests/django --nomigrations {posargs:}

0 commit comments

Comments
 (0)