Merge branch 'franckcuny/master'

This commit is contained in:
Ask Solem 2012-05-14 12:40:11 +01:00
commit 675929f567
2 changed files with 25 additions and 1 deletions

View File

@ -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()

View File

@ -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