mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Removed insert(), value_for_insert() SortedDict methods deprecated in Django 1.5.
This commit is contained in:
@@ -4,7 +4,6 @@ Tests for stuff in django.utils.datastructures.
|
||||
|
||||
import copy
|
||||
import pickle
|
||||
import warnings
|
||||
|
||||
from django.test import SimpleTestCase
|
||||
from django.utils.datastructures import (DictWrapper, ImmutableList,
|
||||
@@ -134,20 +133,6 @@ class SortedDictTests(SimpleTestCase):
|
||||
self.assertEqual(list(reversed(self.d1)), [9, 1, 7])
|
||||
self.assertEqual(list(reversed(self.d2)), [7, 0, 9, 1])
|
||||
|
||||
def test_insert(self):
|
||||
d = SortedDict()
|
||||
with warnings.catch_warnings(record=True) as w:
|
||||
warnings.simplefilter("always")
|
||||
d.insert(0, "hello", "world")
|
||||
assert w[0].category is DeprecationWarning
|
||||
|
||||
def test_value_for_index(self):
|
||||
d = SortedDict({"a": 3})
|
||||
with warnings.catch_warnings(record=True) as w:
|
||||
warnings.simplefilter("always")
|
||||
self.assertEqual(d.value_for_index(0), 3)
|
||||
assert w[0].category is DeprecationWarning
|
||||
|
||||
|
||||
class MergeDictTests(SimpleTestCase):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user