mirror of
https://github.com/django/django.git
synced 2025-10-10 02:22:22 +00:00
Removed insert(), value_for_insert() SortedDict methods deprecated in Django 1.5.
This commit is contained in:
parent
8eadbc5a03
commit
7379d9acea
3 changed files with 0 additions and 55 deletions
|
@ -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):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue