-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix tests with latest dependencies #2332
Conversation
d909fca
to
a78a699
Compare
Rebased on master as a couple of the changes have been merged from other PRs. Tests of current master are passing in GitHub Actions because the latest versions of some dependencies are not being used |
c05029a
to
bd49ad2
Compare
"AssertionError: The setup method 'register_blueprint' can no longer be called on the application. It has already handled its first request, any changes will not be applied consistently. Make sure all imports, decorators, functions, etc. needed to set up the application are done before running it."
FAILED tests/test_model.py::test_export_csv - AssertionError: assert 'Col1,Col2\r\..._3,col2_3\r\n' == 'Col1,Col2\r\...,–utf8_2–\r\n'
sqlalchemy.exc.UnboundExecutionError: Bind key 'other' is not in 'SQLALCHEMY_BINDS' config.
> assert model.test == '' E AssertionError: assert None == '' E + where None = <Model test WTForms 3 changed StringField data default value.
> db.engine.execute('CREATE EXTENSION IF NOT EXISTS citext') E AttributeError: 'Engine' object has no attribute 'execute'
SQLAlchemy 2.0.2 removed the invocation of registry.configure() from Mapper.iterate_properties causing this problem. sqlalchemy.orm.registry.configure() was added in 1.4.0b2. Observed as test failures in: flask_admin/tests/sqla/test_basic.py flask_admin/tests/sqla/test_form_rules.py flask_admin/tests/sqla/test_inlineform.py
LegacyAPIWarning: The Query.get() method is considered legacy as of the 1.x series of SQLAlchemy and becomes a legacy construct in 2.0. The method is now available as Session.get() (deprecated since: 2.0)
I am going to close this as outdated as we've just updated the testing framework for flask-admin after it was incorporated into the pallets-eco project. I do think we need to address the testing situation to have better variant testing on some key dependencies, however that may be best to look at from a fresh slate now. Please don't take this as discouragement from helping tighten this up, but as this PR is fairly stale now I think a reboot would be best. |
The commits tested with latest dependencies in #2328.