From 0bd074cc5ae9fed32e6f7d98d687aba3c9dd52c2 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 30 Aug 2014 01:52:36 -0400 Subject: - continue moving things out that don't need to be there - an existing state shouldn't need its load_options/load_path updated; it should maintain those from its original Query source. there's no tests that check this behavior --- test/orm/test_versioning.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test/orm') diff --git a/test/orm/test_versioning.py b/test/orm/test_versioning.py index da8db0110..55ce586b5 100644 --- a/test/orm/test_versioning.py +++ b/test/orm/test_versioning.py @@ -180,6 +180,20 @@ class VersioningTest(fixtures.MappedTest): s1.close() s1.query(Foo).with_lockmode('read').get(f1s1.id) + def test_versioncheck_not_versioned(self): + """ensure the versioncheck logic skips if there isn't a + version_id_col actually configured""" + + Foo = self.classes.Foo + version_table = self.tables.version_table + + mapper(Foo, version_table) + s1 = Session() + f1s1 = Foo(value='f1 value', version_id=1) + s1.add(f1s1) + s1.commit() + s1.query(Foo).with_lockmode('read').get(f1s1.id) + @testing.emits_warning(r'.*does not support updated rowcount') @engines.close_open_connections @testing.requires.update_nowait -- cgit v1.2.1