diff --git a/kombu/tests/transport/test_sqlalchemy.py b/kombu/tests/transport/test_sqlalchemy.py new file mode 100644 index 00000000..a043b0fc --- /dev/null +++ b/kombu/tests/transport/test_sqlalchemy.py @@ -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()