<s> """<STR_LIT>""" <EOL> from cement . core import exc , backend , extension , output , interface <EOL> from cement . utils import test <EOL> class IBogus ( interface . Interface ) : <EOL> class IMeta : <EOL> label = '<STR_LIT>' <EOL> class BogusExtensionHandler ( extension . CementExtensionHandler ) : <EOL> class Meta : <EOL> interface = IBogus <EOL> label = '<STR_LIT>' <EOL> class ExtensionTestCase ( test . CementCoreTestCase ) : <EOL> @ test . raises ( exc . FrameworkError ) <EOL> def test_invalid_extension_handler ( self ) : <EOL> self . app . handler . register ( BogusExtensionHandler ) <EOL> def test_load_extensions ( self ) : <EOL> ext = extension . CementExtensionHandler ( ) <EOL> ext . _setup ( self . app ) <EOL> ext . load_extensions ( [ '<STR_LIT>' ] ) <EOL> def test_load_extensions_again ( self ) : <EOL> ext = extension . CementExtensionHandler ( ) <EOL> ext . _setup ( self . app ) <EOL> ext . load_extensions ( [ '<STR_LIT>' ] ) <EOL> ext . load_extensions ( [ '<STR_LIT>' ] ) <EOL> @ test . raises ( exc . FrameworkError ) <EOL> def test_load_bogus_extension ( self ) : <EOL> ext = extension . CementExtensionHandler ( ) <EOL> ext . _setup ( self . app ) <EOL> ext . load_extensions ( [ '<STR_LIT>' ] ) <EOL> def test_get_loaded_extensions ( self ) : <EOL> ext = extension . CementExtensionHandler ( ) <EOL> ext . _setup ( self . app ) <EOL> res = '<STR_LIT>' not in ext . get_loaded_extensions ( ) <EOL> self . ok ( res ) <EOL> ext . load_extensions ( [ '<STR_LIT>' ] ) <EOL> res = '<STR_LIT>' in ext . get_loaded_extensions ( ) <EOL> self . ok ( res ) </s>
