aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_apis.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_apis.py')
-rw-r--r--tests/test_apis.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_apis.py b/tests/test_apis.py
index 218c009..0296f27 100644
--- a/tests/test_apis.py
+++ b/tests/test_apis.py
@@ -214,6 +214,14 @@ class TestOrderedDict(unittest.TestCase):
[('first', 'This'), ('fourth', 'self'),
('third', 'a'), ('fifth', 'test')])
+ def textBadLink(self):
+ """ Test OrderedDict change order with bad location. """
+ self.assertRaises(ValueError, self.odict.link('fourth', '<bad'))
+ # Check for data integrity ("fourth" wasn't deleted).'
+ self.assertEqual(self.odict.items(),
+ [('first', 'This'), ('third', 'a'),
+ ('fourth', 'self'), ('fifth', 'test')])
+
class TestErrors(unittest.TestCase):
""" Test Error Reporting. """