def test_sqlite_config(self):
        import mock

        config = Configurator(settings={'sqlalchemy.url': 'sqlite://'})

        with mock.patch('pyramid_sqlalchemy.init_sqlalchemy') as init_sqlalchemy:
            includeme(config)
            self.assertTrue(init_sqlalchemy.called)
            engine = init_sqlalchemy.mock_calls[0][1][0]
            self.assertEqual(str(engine.url), 'sqlite://')
Ejemplo n.º 2
0
    def test_sqlite_config(self):
        import mock

        config = Configurator(settings={'sqlalchemy.url': 'sqlite://'})

        with mock.patch(
                'pyramid_sqlalchemy.init_sqlalchemy') as init_sqlalchemy:
            includeme(config)
            self.assertTrue(init_sqlalchemy.called)
            engine = init_sqlalchemy.mock_calls[0][1][0]
            self.assertEqual(str(engine.url), 'sqlite://')
Ejemplo n.º 3
0
    def test_includeme(self):
        from pyramid_sqlalchemy import includeme

        includeme(self.config)