mirror of https://github.com/celery/kombu.git
Merge branch 'franckcuny/master'
This commit is contained in:
commit
675929f567
|
@ -0,0 +1,24 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
import tempfile
|
||||
|
||||
from kombu.connection import BrokerConnection
|
||||
from kombu.tests.utils import TestCase
|
||||
|
||||
class test_sqlalchemy(TestCase):
|
||||
|
||||
def test_url_parser(self):
|
||||
from kombu.transport import sqlalchemy
|
||||
|
||||
tmppath = tempfile.mkdtemp()
|
||||
|
||||
url = "sqlalchemy+sqlite://{path}/celerydb.sqlite".format(path=tmppath)
|
||||
connection = BrokerConnection(url).connect()
|
||||
|
||||
url = "sqla+sqlite://{path}/celerydb.sqlite".format(path=tmppath)
|
||||
connection = BrokerConnection(url).connect()
|
||||
|
||||
# Should prevent regression fixed by f187ccd
|
||||
url = "sqlb+sqlite://{path}/celerydb.sqlite".format(path=tmppath)
|
||||
with self.assertRaises(KeyError):
|
||||
BrokerConnection(url).connect()
|
|
@ -7,7 +7,7 @@ from sqlalchemy import create_engine
|
|||
from sqlalchemy.exc import OperationalError
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
|
||||
from kombu import virtual
|
||||
from kombu.transport import virtual
|
||||
from kombu.exceptions import StdChannelError
|
||||
|
||||
from .models import Queue, Message, metadata
|
||||
|
|
Loading…
Reference in New Issue