def tearDown(self): registry = Registry() registry.unregister('abstract')
def test_unregister(self): registry = Registry() registry.register('abstract', AbstractKeyGenerator) registry.unregister('abstract') self.assertRaises(GeneratorError, registry.get, 'abstract') self.assertFalse(registry.get('abstract', False))