diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-11-23 12:25:20 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-11-23 12:30:43 -0500 |
| commit | c2432d9d190bdc67f274b8da9296ff9ed044bef1 (patch) | |
| tree | 1958f191542aef6e41f69e4a6ded8a4a62f9f5ba /lib/sqlalchemy/testing | |
| parent | 26ba917996ec67ca24afa8c853f634edc08b06bb (diff) | |
| download | sqlalchemy-c2432d9d190bdc67f274b8da9296ff9ed044bef1.tar.gz | |
Generalize DescriptorProps.uses_objects
Previously, uses_objects was specific to the SynonymAttribute;
generalize it so that it defaults to False for other DescriptorProps.
Immediate fix is against CompositeProperty.
Fixed regression introduced in 1.3.0 related to the association proxy
refactor in :ticket:`4351` that prevented :func:`.composite` attributes
from working in terms of an association proxy that references them.
Add test coverage for association proxies that refer to Composite
attributes as endpoints.
Fixes: #5000
Change-Id: Iea6fb1bd3314d861a9bc22491b0ae1e6c5e6340d
Diffstat (limited to 'lib/sqlalchemy/testing')
| -rw-r--r-- | lib/sqlalchemy/testing/fixtures.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/sqlalchemy/testing/fixtures.py b/lib/sqlalchemy/testing/fixtures.py index e2237fb17..04d09f8dd 100644 --- a/lib/sqlalchemy/testing/fixtures.py +++ b/lib/sqlalchemy/testing/fixtures.py @@ -388,7 +388,10 @@ class DeclarativeMappedTest(MappedTest): cls=DeclarativeBasic, ) cls.DeclarativeBasic = _DeclBase - fn() + + # sets up cls.Basic which is helpful for things like composite + # classes + super(DeclarativeMappedTest, cls)._with_register_classes(fn) if cls.metadata.tables and cls.run_create_tables: cls.metadata.create_all(config.db) |
