Removed references to django.utils.unittest which is PendingDeprecation
This commit is contained in:
parent
ec784c486b
commit
2fd03b39ab
|
@ -18,7 +18,6 @@ from django.db.models.fields import (
|
||||||
from django.db.models.fields.files import FileField, ImageField
|
from django.db.models.fields.files import FileField, ImageField
|
||||||
from django.utils import six
|
from django.utils import six
|
||||||
from django.utils.functional import lazy
|
from django.utils.functional import lazy
|
||||||
from django.utils.unittest import skipIf
|
|
||||||
|
|
||||||
from .models import (
|
from .models import (
|
||||||
Foo, Bar, Whiz, BigD, BigS, BigInt, Post, NullBooleanModel,
|
Foo, Bar, Whiz, BigD, BigS, BigInt, Post, NullBooleanModel,
|
||||||
|
@ -517,7 +516,7 @@ class PromiseTest(test.TestCase):
|
||||||
AutoField(primary_key=True).get_prep_value(lazy_func()),
|
AutoField(primary_key=True).get_prep_value(lazy_func()),
|
||||||
int)
|
int)
|
||||||
|
|
||||||
@skipIf(six.PY3, "Python 3 has no `long` type.")
|
@unittest.skipIf(six.PY3, "Python 3 has no `long` type.")
|
||||||
def test_BigIntegerField(self):
|
def test_BigIntegerField(self):
|
||||||
lazy_func = lazy(lambda: long(9999999999999999999), long)
|
lazy_func = lazy(lambda: long(9999999999999999999), long)
|
||||||
self.assertIsInstance(
|
self.assertIsInstance(
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
import datetime
|
import datetime
|
||||||
|
import unittest
|
||||||
|
|
||||||
from django.test import TransactionTestCase
|
from django.test import TransactionTestCase
|
||||||
from django.utils.unittest import skipUnless
|
|
||||||
from django.db import connection, DatabaseError, IntegrityError
|
from django.db import connection, DatabaseError, IntegrityError
|
||||||
from django.db.models.fields import IntegerField, TextField, CharField, SlugField
|
from django.db.models.fields import IntegerField, TextField, CharField, SlugField
|
||||||
from django.db.models.fields.related import ManyToManyField, ForeignKey
|
from django.db.models.fields.related import ManyToManyField, ForeignKey
|
||||||
|
@ -91,7 +92,7 @@ class SchemaTests(TransactionTestCase):
|
||||||
lambda: list(Author.objects.all()),
|
lambda: list(Author.objects.all()),
|
||||||
)
|
)
|
||||||
|
|
||||||
@skipUnless(connection.features.supports_foreign_keys, "No FK support")
|
@unittest.skipUnless(connection.features.supports_foreign_keys, "No FK support")
|
||||||
def test_fk(self):
|
def test_fk(self):
|
||||||
"Tests that creating tables out of FK order, then repointing, works"
|
"Tests that creating tables out of FK order, then repointing, works"
|
||||||
# Create the table
|
# Create the table
|
||||||
|
@ -310,7 +311,7 @@ class SchemaTests(TransactionTestCase):
|
||||||
BookWithM2M._meta.local_many_to_many.remove(new_field)
|
BookWithM2M._meta.local_many_to_many.remove(new_field)
|
||||||
del BookWithM2M._meta._m2m_cache
|
del BookWithM2M._meta._m2m_cache
|
||||||
|
|
||||||
@skipUnless(connection.features.supports_check_constraints, "No check constraints")
|
@unittest.skipUnless(connection.features.supports_check_constraints, "No check constraints")
|
||||||
def test_check_constraints(self):
|
def test_check_constraints(self):
|
||||||
"""
|
"""
|
||||||
Tests creating/deleting CHECK constraints
|
Tests creating/deleting CHECK constraints
|
||||||
|
|
Loading…
Reference in New Issue