The error message that is emitted when a URL cannot be parsed no longer
includes the URL itself within the error message.
Fixes: #12579
Change-Id: Icd17bd4fe0930036662b6a4fe0264cb13df04ba7
--- /dev/null
+.. change::
+ :tags: bug, engine
+ :tickets: 12579
+
+ The error message that is emitted when a URL cannot be parsed no longer
+ includes the URL itself within the error message.
+
else:
raise exc.ArgumentError(
- "Could not parse SQLAlchemy URL from string '%s'" % name
+ "Could not parse SQLAlchemy URL from given URL string"
)
module=mock_dbapi,
)
+ def test_cant_parse_str(self):
+ with expect_raises_message(
+ exc.ArgumentError,
+ r"^Could not parse SQLAlchemy URL from given URL string$",
+ ):
+ create_engine("notarealurl")
+
def test_urlattr(self):
"""test the url attribute on ``Engine``."""