Skip to content

Commit 474a330

Browse files
committed
Fix flake8 formatting
1 parent cae2f08 commit 474a330

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

captcha/tests/drf_views.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from rest_framework import serializers, status
22
from rest_framework.decorators import api_view
33
from rest_framework.response import Response
4+
45
from django.contrib.auth.models import User
56

67
from captcha.serializers import CaptchaModelSerializer, CaptchaSerializer

captcha/tests/tests.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,23 @@
33
import os
44
import re
55
from io import BytesIO
6+
from unittest import skipIf
67
from unittest.mock import call, patch
78

89
from PIL import Image
910
from testfixtures import LogCapture
1011

1112
import django
13+
from django.conf import settings as django_settings
1214
from django.core import management
1315
from django.core.exceptions import ImproperlyConfigured
1416
from django.test import TestCase, override_settings
1517
from django.urls import reverse
1618
from django.utils import timezone
1719
from django.utils.translation import gettext_lazy
18-
from django.conf import settings as django_settings
20+
1921
from captcha.conf import settings
2022
from captcha.models import CaptchaStore
21-
from unittest import skipIf
2223

2324

2425
@override_settings(ROOT_URLCONF="captcha.tests.urls")

captcha/tests/urls.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from django.urls import include, re_path
21
from django.conf import settings
2+
from django.urls import include, re_path
33

44
from .views import (
55
test,
@@ -26,8 +26,8 @@
2626
]
2727

2828

29-
if 'rest_framework' in settings.INSTALLED_APPS:
30-
from .drf_views import test_serializer, test_model_serializer
29+
if "rest_framework" in settings.INSTALLED_APPS:
30+
from .drf_views import test_model_serializer, test_serializer
3131

3232
urlpatterns += [
3333
re_path(r"test-serializer/$", test_serializer, name="captcha-test-serializer"),
@@ -36,5 +36,4 @@
3636
test_model_serializer,
3737
name="captcha-test-model-serializer",
3838
),
39-
4039
]

captcha/tests/views.py

-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
from django import forms
32
from django.contrib.auth.models import User
43
from django.http import HttpResponse
@@ -112,4 +111,3 @@ class CaptchaTestForm(forms.Form):
112111
captcha2 = CaptchaField(id_prefix="form2")
113112

114113
return _test(request, CaptchaTestForm)
115-

testproject/drf_settings.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
from testproject.settings import * # noqa
2-
INSTALLED_APPS.append("rest_framework") # noqa
1+
from testproject.settings import * # noqa
32

3+
4+
INSTALLED_APPS.append("rest_framework") # noqa

0 commit comments

Comments
 (0)