Removed insert(), value_for_insert() SortedDict methods deprecated in Django 1.5.

This commit is contained in:
Ramiro Morales 2013-06-28 22:38:13 -03:00
parent 8eadbc5a03
commit 7379d9acea
3 changed files with 0 additions and 55 deletions

View file

@ -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):