Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Resolve isort differences between local and tox environments
  • Loading branch information
lovelydinosaur committed Jun 1, 2016
commit 3a808a03d63d910cb68afa29a94f9a9b17c2f7eb
2 changes: 1 addition & 1 deletion runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

FLAKE8_ARGS = ['rest_framework', 'tests', '--ignore=E501']

ISORT_ARGS = ['--recursive', '--check-only', 'rest_framework', 'tests']
ISORT_ARGS = ['--recursive', '--check-only', '-p', 'tests', 'rest_framework', 'tests']

sys.path.append(os.path.dirname(__file__))

Expand Down
2 changes: 1 addition & 1 deletion tests/test_atomic_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
from django.http import Http404
from django.test import TestCase, TransactionTestCase
from django.utils.decorators import method_decorator
from tests.models import BasicModel

from rest_framework import status
from rest_framework.exceptions import APIException
from rest_framework.response import Response
from rest_framework.test import APIRequestFactory
from rest_framework.views import APIView
from tests.models import BasicModel

factory = APIRequestFactory()

Expand Down
6 changes: 3 additions & 3 deletions tests/test_generics.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
from django.shortcuts import get_object_or_404
from django.test import TestCase
from django.utils import six
from tests.models import (
BasicModel, ForeignKeySource, ForeignKeyTarget, RESTFrameworkModel
)

from rest_framework import generics, renderers, serializers, status
from rest_framework.response import Response
from rest_framework.test import APIRequestFactory
from tests.models import (
BasicModel, ForeignKeySource, ForeignKeyTarget, RESTFrameworkModel
)

factory = APIRequestFactory()

Expand Down
2 changes: 1 addition & 1 deletion tests/test_multitable_inheritance.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

from django.db import models
from django.test import TestCase
from tests.models import RESTFrameworkModel

from rest_framework import serializers
from tests.models import RESTFrameworkModel


# Models
Expand Down
2 changes: 1 addition & 1 deletion tests/test_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from django.core.urlresolvers import ResolverMatch
from django.db import models
from django.test import TestCase
from tests.models import BasicModel

from rest_framework import (
HTTP_HEADER_ENCODING, authentication, generics, permissions, serializers,
Expand All @@ -17,6 +16,7 @@
from rest_framework.filters import DjangoObjectPermissionsFilter
from rest_framework.routers import DefaultRouter
from rest_framework.test import APIRequestFactory
from tests.models import BasicModel

factory = APIRequestFactory()

Expand Down
6 changes: 3 additions & 3 deletions tests/test_relations_hyperlink.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

from django.conf.urls import url
from django.test import TestCase, override_settings

from rest_framework import serializers
from rest_framework.test import APIRequestFactory
from tests.models import (
ForeignKeySource, ForeignKeyTarget, ManyToManySource, ManyToManyTarget,
NullableForeignKeySource, NullableOneToOneSource, OneToOneTarget
)

from rest_framework import serializers
from rest_framework.test import APIRequestFactory

factory = APIRequestFactory()
request = factory.get('/') # Just to ensure we have a request in the serializer context

Expand Down
4 changes: 2 additions & 2 deletions tests/test_relations_pk.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

from django.test import TestCase
from django.utils import six

from rest_framework import serializers
from tests.models import (
ForeignKeySource, ForeignKeyTarget, ManyToManySource, ManyToManyTarget,
NullableForeignKeySource, NullableOneToOneSource,
NullableUUIDForeignKeySource, OneToOneTarget, UUIDForeignKeyTarget
)

from rest_framework import serializers


# ManyToMany
class ManyToManyTargetSerializer(serializers.ModelSerializer):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_relations_slug.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from django.test import TestCase

from rest_framework import serializers
from tests.models import (
ForeignKeySource, ForeignKeyTarget, NullableForeignKeySource
)

from rest_framework import serializers


class ForeignKeyTargetSerializer(serializers.ModelSerializer):
sources = serializers.SlugRelatedField(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from django.conf.urls import include, url
from django.test import TestCase, override_settings
from django.utils import six
from tests.models import BasicModel

from rest_framework import generics, routers, serializers, status, viewsets
from rest_framework.parsers import JSONParser
Expand All @@ -12,6 +11,7 @@
)
from rest_framework.response import Response
from rest_framework.views import APIView
from tests.models import BasicModel


# Serializer used to test BasicModel
Expand Down
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
from django.core.exceptions import ImproperlyConfigured
from django.test import TestCase, override_settings
from django.utils import six
from tests.models import BasicModel

import rest_framework.utils.model_meta
from rest_framework.utils.breadcrumbs import get_breadcrumbs
from rest_framework.utils.model_meta import _resolve_model
from rest_framework.views import APIView
from tests.models import BasicModel


class Root(APIView):
Expand Down