mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 09:36:49 +03:00
Remove unittest.skipUnless
This commit is contained in:
parent
6e86a53c92
commit
0b34408172
|
@ -67,14 +67,6 @@ except ImportError:
|
|||
from django.utils.datastructures import SortedDict as OrderedDict
|
||||
|
||||
|
||||
# unittest.SkipUnless only available in Python 2.7.
|
||||
try:
|
||||
import unittest
|
||||
unittest.skipUnless
|
||||
except (ImportError, AttributeError):
|
||||
from django.utils import unittest
|
||||
|
||||
|
||||
# contrib.postgres only supported from 1.8 onwards.
|
||||
try:
|
||||
from django.contrib.postgres import fields as postgres_fields
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
import unittest
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.db import connection, connections, transaction
|
||||
from django.http import Http404
|
||||
|
@ -7,7 +9,6 @@ from django.test import TestCase, TransactionTestCase
|
|||
from django.utils.decorators import method_decorator
|
||||
|
||||
from rest_framework import status
|
||||
from rest_framework.compat import unittest
|
||||
from rest_framework.exceptions import APIException
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.test import APIRequestFactory
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
import datetime
|
||||
import unittest
|
||||
from decimal import Decimal
|
||||
|
||||
from django.conf.urls import url
|
||||
|
@ -12,7 +13,7 @@ from django.utils.dateparse import parse_date
|
|||
from django.utils.six.moves import reload_module
|
||||
|
||||
from rest_framework import filters, generics, serializers, status
|
||||
from rest_framework.compat import django_filters, unittest
|
||||
from rest_framework.compat import django_filters
|
||||
from rest_framework.test import APIRequestFactory
|
||||
|
||||
from .models import BaseFilterableItem, BasicModel, FilterableItem
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
import base64
|
||||
import unittest
|
||||
|
||||
from django.contrib.auth.models import Group, Permission, User
|
||||
from django.core.urlresolvers import ResolverMatch
|
||||
|
@ -11,7 +12,7 @@ from rest_framework import (
|
|||
HTTP_HEADER_ENCODING, authentication, generics, permissions, serializers,
|
||||
status
|
||||
)
|
||||
from rest_framework.compat import guardian, unittest
|
||||
from rest_framework.compat import guardian
|
||||
from rest_framework.filters import DjangoObjectPermissionsFilter
|
||||
from rest_framework.routers import DefaultRouter
|
||||
from rest_framework.test import APIRequestFactory
|
||||
|
|
Loading…
Reference in New Issue
Block a user