summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2014-05-07 22:03:10 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2014-05-08 22:53:11 +0200
commit92a1e71100427e0d6e16b9c2bb355ea0a48eb71d (patch)
tree524724ebbd05fc968ea2624f23225359903a9e10 /tests
parente3bc11cca9425367efb4ce1eb923785895a83c1b (diff)
[1.7.x] Split ignores_nulls_in_unique_constraints feature.
Oracle and SQL Server don't have exactly the same limitations. It's worth treating them differently. Backport of cff59bed from master
Diffstat (limited to 'tests')
-rw-r--r--tests/distinct_on_fields/tests.py1
-rw-r--r--tests/model_forms/tests.py2
-rw-r--r--tests/model_formsets/tests.py2
-rw-r--r--tests/one_to_one_regress/tests.py2
4 files changed, 4 insertions, 3 deletions
diff --git a/tests/distinct_on_fields/tests.py b/tests/distinct_on_fields/tests.py
index 33ddf80ff4..3e6e6c2358 100644
--- a/tests/distinct_on_fields/tests.py
+++ b/tests/distinct_on_fields/tests.py
@@ -8,6 +8,7 @@ from .models import Tag, Celebrity, Fan, Staff, StaffTag
@skipUnlessDBFeature('can_distinct_on_fields')
+@skipUnlessDBFeature('supports_nullable_unique_constraints')
class DistinctOnTests(TestCase):
def setUp(self):
t1 = Tag.objects.create(name='t1')
diff --git a/tests/model_forms/tests.py b/tests/model_forms/tests.py
index 38d1260de0..9a88ff60f0 100644
--- a/tests/model_forms/tests.py
+++ b/tests/model_forms/tests.py
@@ -660,7 +660,7 @@ class UniqueTest(TestCase):
form = TripleForm({'left': '1', 'middle': '3', 'right': '1'})
self.assertTrue(form.is_valid())
- @skipUnlessDBFeature('ignores_nulls_in_unique_constraints')
+ @skipUnlessDBFeature('supports_nullable_unique_constraints')
def test_unique_null(self):
title = 'I May Be Wrong But I Doubt It'
form = BookForm({'title': title, 'author': self.writer.pk})
diff --git a/tests/model_formsets/tests.py b/tests/model_formsets/tests.py
index c1e01cd6be..85ef430b93 100644
--- a/tests/model_formsets/tests.py
+++ b/tests/model_formsets/tests.py
@@ -661,7 +661,7 @@ class ModelFormsetTest(TestCase):
self.assertEqual(book1.title, 'Flowers of Evil')
self.assertEqual(book1.notes, 'English translation of Les Fleurs du Mal')
- @skipUnlessDBFeature('ignores_nulls_in_unique_constraints')
+ @skipUnlessDBFeature('supports_partially_nullable_unique_constraints')
def test_inline_formsets_with_nullable_unique_together(self):
# Test inline formsets where the inline-edited object has a
# unique_together constraint with a nullable member
diff --git a/tests/one_to_one_regress/tests.py b/tests/one_to_one_regress/tests.py
index 17528de311..f14d1eeabd 100644
--- a/tests/one_to_one_regress/tests.py
+++ b/tests/one_to_one_regress/tests.py
@@ -229,7 +229,7 @@ class OneToOneRegressionTests(TestCase):
# Several instances of the origin are only possible if database allows
# inserting multiple NULL rows for a unique constraint
- if connection.features.ignores_nulls_in_unique_constraints:
+ if connection.features.supports_nullable_unique_constraints:
UndergroundBar.objects.create()
# When there are several instances of the origin