def test_includeme(self): from pyramid_mailer.interfaces import IMailer from pyramid_mailer.mailer import DummyMailer from pyramid_mailer.testing import includeme registry = DummyRegistry() config = DummyConfig(registry, {}) includeme(config) self.assertEqual(registry.registered[IMailer].__class__, DummyMailer)
def test_includeme(self): from pyramid_mailer import get_mailer from pyramid_mailer.interfaces import IMailer from pyramid_mailer.mailer import DummyMailer from pyramid_mailer.testing import includeme registry = DummyRegistry() config = DummyConfig(registry, {}) includeme(config) self.assertEqual(registry.registered[IMailer].__class__, DummyMailer) self.assertEqual(config.request_methods['mailer'], { 'callable': get_mailer, 'reify': True, })
def _setupMailer(self): from pyramid_mailer.testing import includeme includeme(self.config)
def _callFUT(self, config): from pyramid_errmail import includeme return includeme(config)