From ee036d5d1898243900e0a6bbc3f02974068b9e90 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 19 Nov 2008 04:34:05 +0000 Subject: - Add __delitem__ method to ``testing.DummyModel``. --- repoze/bfg/tests/test_testing.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'repoze/bfg/tests/test_testing.py') diff --git a/repoze/bfg/tests/test_testing.py b/repoze/bfg/tests/test_testing.py index aa00b5c33..0dd3539df 100644 --- a/repoze/bfg/tests/test_testing.py +++ b/repoze/bfg/tests/test_testing.py @@ -287,7 +287,7 @@ class TestDummyModel(unittest.TestCase): klass = self._getTargetClass() return klass(name, parent, **kw) - def test__setitem__and__getitem__and__contains__(self): + def test__setitem__and__getitem__and__delitem__and__contains__(self): class Dummy: pass dummy = Dummy() @@ -298,6 +298,8 @@ class TestDummyModel(unittest.TestCase): self.assertEqual(model['abc'], dummy) self.assertRaises(KeyError, model.__getitem__, 'none') self.failUnless('abc' in model) + del model['abc'] + self.failIf('abc' in model) def test_extra_params(self): model = self._makeOne(foo=1) -- cgit v1.2.3