Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
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)
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)