<s> import unittest <EOL> class TestIncludemeDebug ( unittest . TestCase ) : <EOL> def test_includeme ( self ) : <EOL> from pyramid_mailer . interfaces import IMailer <EOL> from pyramid_mailer . mailer import DebugMailer <EOL> from pyramid_mailer . debug import includeme <EOL> registry = DummyRegistry ( ) <EOL> config = DummyConfig ( registry , { } ) <EOL> includeme ( config ) <EOL> self . assertEqual ( registry . registered [ IMailer ] . __class__ , DebugMailer ) <EOL> class DummyRegistry ( object ) : <EOL> def __init__ ( self , result = None ) : <EOL> self . result = result <EOL> self . registered = { } <EOL> def registerUtility ( self , impl , iface ) : <EOL> self . registered [ iface ] = impl <EOL> class DummyConfig ( object ) : <EOL> def __init__ ( self , registry , settings ) : <EOL> self . registry = registry <EOL> self . registry . settings = settings </s>
