diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-11-28 23:23:27 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-11-28 23:23:27 -0500 |
commit | 31cecebd4831fbf58310509c1486244a532d96b9 (patch) | |
tree | 00028588d33a02b2847dbaadfc20ea0c1f9653d6 /test/sql/test_selectable.py | |
parent | 4aaf3753d75c68050c136e734c29aae5ff9504b4 (diff) | |
download | sqlalchemy-31cecebd4831fbf58310509c1486244a532d96b9.tar.gz |
- add support for specifying tables or entities for "of"
- implement Query with_for_update()
- rework docs and tests
Diffstat (limited to 'test/sql/test_selectable.py')
-rw-r--r-- | test/sql/test_selectable.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/sql/test_selectable.py b/test/sql/test_selectable.py index 66cdd87c2..8c7bf43b0 100644 --- a/test/sql/test_selectable.py +++ b/test/sql/test_selectable.py @@ -1910,6 +1910,7 @@ class ForUpdateTest(fixtures.TestBase, AssertsCompiledSQL): def _assert_legacy(self, leg, read=False, nowait=False): t = table('t', column('c')) s1 = select([t], for_update=leg) + if leg is False: assert s1._for_update_arg is None assert s1.for_update is None @@ -1937,6 +1938,12 @@ class ForUpdateTest(fixtures.TestBase, AssertsCompiledSQL): def test_read_nowait_legacy(self): self._assert_legacy("read_nowait", read=True, nowait=True) + def test_legacy_setter(self): + t = table('t', column('c')) + s = select([t]) + s.for_update = 'nowait' + eq_(s._for_update_arg.nowait, True) + def test_basic_clone(self): t = table('t', column('c')) s = select([t]).with_for_update(read=True, of=t.c.c) |