diff options
| author | Chris McDonough <chrism@agendaless.com> | 2008-11-19 04:34:05 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2008-11-19 04:34:05 +0000 |
| commit | ee036d5d1898243900e0a6bbc3f02974068b9e90 (patch) | |
| tree | 4f07104845ec162da5b2b548fbd8e93b8db9d6ab /repoze/bfg/tests/test_testing.py | |
| parent | e8ebc2252dfaf18fde9253b3ed067fc53678227c (diff) | |
| download | pyramid-ee036d5d1898243900e0a6bbc3f02974068b9e90.tar.gz pyramid-ee036d5d1898243900e0a6bbc3f02974068b9e90.tar.bz2 pyramid-ee036d5d1898243900e0a6bbc3f02974068b9e90.zip | |
- Add __delitem__ method to ``testing.DummyModel``.
Diffstat (limited to 'repoze/bfg/tests/test_testing.py')
| -rw-r--r-- | repoze/bfg/tests/test_testing.py | 4 |
1 files changed, 3 insertions, 1 deletions
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) |
