示例#1
0
    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)
示例#2
0
    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,
            })
示例#3
0
    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,
        })
示例#4
0
 def _setupMailer(self):
     from pyramid_mailer.testing import includeme
     includeme(self.config)
示例#5
0
 def _callFUT(self, config):
     from pyramid_errmail import includeme
     return includeme(config)