diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-06-21 13:08:59 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-06-21 13:08:59 -0400 |
| commit | 7ffcc8ec0c6faf18f3dbbc2ac01ab391933d7a81 (patch) | |
| tree | 7bdd0c0d7b359a80e1d3430dcbeb8ea4094da077 /test/orm/test_options.py | |
| parent | 73573a6fda1c3ebde27a169199b1f33fccb1e415 (diff) | |
| download | sqlalchemy-7ffcc8ec0c6faf18f3dbbc2ac01ab391933d7a81.tar.gz | |
ensure test has deterministic FROM rendering
test_options_entities_replaced_with_equivs_three did not
have deterministic FROM ordering, so adding an inner
join from user->address should ensure there's a single
FROM element that is a series of joins.
Change-Id: Ic78e14959699c8d2ae7b3c278f4d8ee1e3a2b590
Diffstat (limited to 'test/orm/test_options.py')
| -rw-r--r-- | test/orm/test_options.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/orm/test_options.py b/test/orm/test_options.py index 31ab100fa..78826a735 100644 --- a/test/orm/test_options.py +++ b/test/orm/test_options.py @@ -472,6 +472,7 @@ class WithEntitiesTest(QueryTest, AssertsCompiledSQL): .options(joinedload(User.addresses)) .with_only_columns(User, Address) .options(joinedload(Address.dingaling)) + .join_from(User, Address) ) self.assert_compile( q, @@ -481,8 +482,9 @@ class WithEntitiesTest(QueryTest, AssertsCompiledSQL): "addresses_1.email_address AS email_address_1, " "dingalings_1.id AS id_3, dingalings_1.address_id, " "dingalings_1.data " - "FROM users LEFT OUTER JOIN addresses AS addresses_1 " - "ON users.id = addresses_1.user_id, addresses " + "FROM users JOIN addresses ON users.id = addresses.user_id " + "LEFT OUTER JOIN addresses AS addresses_1 " + "ON users.id = addresses_1.user_id " "LEFT OUTER JOIN dingalings AS dingalings_1 " "ON addresses.id = dingalings_1.address_id " "ORDER BY addresses_1.id", |
