def test_missing_methods(self): fn = IndexedBasedFinder() for method in ('pop', 'update', 'get', 'setdefault'): with self.assertRaises(NotImplementedError, msg=method): getattr(fn, method)() with self.assertRaises(NotImplementedError): fn['asd'] = 6
def test_isinstance(self): self.assertIsInstance(IndexedBasedFinder(), dict)