How to use the aldjemy.orm.get_session function in aldjemy

To help you get started, we’ve selected a few aldjemy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Deepwalker / aldjemy / test_project / sample / tests.py View on Github external
def test_sessions(self):
        from aldjemy.orm import get_session
        from django.db import connections
        session_default = get_session()
        session_default2 = get_session('default')
        self.assertEqual(session_default, session_default2)
        session_logs = get_session('logs')
        self.assertEqual(connections['default'].sa_session, session_default)
        self.assertEqual(connections['logs'].sa_session, session_logs)
        self.assertNotEqual(session_default, session_logs)
github Deepwalker / aldjemy / test_project / sample / tests.py View on Github external
def test_sessions(self):
        from aldjemy.orm import get_session
        from django.db import connections
        session_default = get_session()
        session_default2 = get_session('default')
        self.assertEqual(session_default, session_default2)
        session_logs = get_session('logs')
        self.assertEqual(connections['default'].sa_session, session_default)
        self.assertEqual(connections['logs'].sa_session, session_logs)
        self.assertNotEqual(session_default, session_logs)
github Deepwalker / aldjemy / test_project / sample / tests.py View on Github external
def test_sessions(self):
        from aldjemy.orm import get_session
        from django.db import connections
        session_default = get_session()
        session_default2 = get_session('default')
        self.assertEqual(session_default, session_default2)
        session_logs = get_session('logs')
        self.assertEqual(connections['default'].sa_session, session_default)
        self.assertEqual(connections['logs'].sa_session, session_logs)
        self.assertNotEqual(session_default, session_logs)