summaryrefslogtreecommitdiff
path: root/tests/basic
diff options
context:
space:
mode:
authorMorgan Aubert <morgan.aubert@savoirfairelinux.com>2016-12-14 11:48:57 -0500
committerTim Graham <timograham@gmail.com>2016-12-14 13:35:13 -0500
commitadb791fdcbdbd6d1b5c258d114b88953d2248c13 (patch)
treeb090c6eb3f1b0f15cd29612713f9d1cd4066d345 /tests/basic
parent92c5eeac3358e8243e29604d51b724f46fd5305f (diff)
Moved test_field_ordering to the model_fields package.
Diffstat (limited to 'tests/basic')
-rw-r--r--tests/basic/tests.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/tests/basic/tests.py b/tests/basic/tests.py
index b4acd1ff45..05a49ac3ab 100644
--- a/tests/basic/tests.py
+++ b/tests/basic/tests.py
@@ -5,7 +5,6 @@ from datetime import datetime, timedelta
from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist
from django.db import DEFAULT_DB_ALIAS, DatabaseError, connections
-from django.db.models.fields import Field
from django.db.models.manager import BaseManager
from django.db.models.query import EmptyQuerySet, QuerySet
from django.test import (
@@ -268,22 +267,6 @@ class ModelTest(TestCase):
s = {a10, a11, a12}
self.assertIn(Article.objects.get(headline='Article 11'), s)
- def test_field_ordering(self):
- """
- Field instances have a `__lt__` comparison function to define an
- ordering based on their creation. Prior to #17851 this ordering
- comparison relied on the now unsupported `__cmp__` and was assuming
- compared objects were both Field instances raising `AttributeError`
- when it should have returned `NotImplemented`.
- """
- f1 = Field()
- f2 = Field(auto_created=True)
- f3 = Field()
- self.assertLess(f2, f1)
- self.assertGreater(f3, f1)
- self.assertIsNotNone(f1)
- self.assertNotIn(f2, (None, 1, ''))
-
def test_extra_method_select_argument_with_dashes_and_values(self):
# The 'select' argument to extra() supports names with dashes in
# them, as long as you use values().