test the url attribute on ``Engine``.
(self)
| 811 | create_engine("notarealurl") |
| 812 | |
| 813 | def test_urlattr(self): |
| 814 | """test the url attribute on ``Engine``.""" |
| 815 | |
| 816 | e = create_engine( |
| 817 | "mysql+mysqldb://scott:tiger@localhost/test", |
| 818 | module=mock_dbapi, |
| 819 | _initialize=False, |
| 820 | ) |
| 821 | u = url.make_url("mysql+mysqldb://scott:tiger@localhost/test") |
| 822 | e2 = create_engine(u, module=mock_dbapi, _initialize=False) |
| 823 | assert e.url.drivername == e2.url.drivername == "mysql+mysqldb" |
| 824 | assert e.url.username == e2.url.username == "scott" |
| 825 | assert e2.url is u |
| 826 | eq_( |
| 827 | u.render_as_string(hide_password=False), |
| 828 | "mysql+mysqldb://scott:tiger@localhost/test", |
| 829 | ) |
| 830 | assert repr(u) == "mysql+mysqldb://scott:***@localhost/test" |
| 831 | assert repr(e) == "Engine(mysql+mysqldb://scott:***@localhost/test)" |
| 832 | assert repr(e2) == "Engine(mysql+mysqldb://scott:***@localhost/test)" |
| 833 | |
| 834 | def test_poolargs(self): |
| 835 | """test that connection pool args make it thru""" |
nothing calls this directly
no test coverage detected