summaryrefslogtreecommitdiff
path: root/test/dialect/oracle/test_dialect.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2020-12-08 22:07:48 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2020-12-09 11:20:26 -0500
commit7528c2465b3e56ed094f155bff2a3ab8c89cc84f (patch)
treef6272e47d90df26e663b0f753b01e1d5f0157e5a /test/dialect/oracle/test_dialect.py
parentc736eef8b35841af89ec19469aa496585efd3865 (diff)
downloadsqlalchemy-7528c2465b3e56ed094f155bff2a3ab8c89cc84f.tar.gz
Implement Oracle SERIALIZABLE + real read of isolation level
There's some significant awkwardness in that we can't read the level unless a transaction is started, which normally does not occur unless DML is emitted. The implementation uses the local_transaction_id function to start a transaction. It is not known what the performance impact of this might have, however by default the function is called only once on first connect and later only if the get_isolation_level() method is used. Fixes: #5755 Change-Id: I0453a6b0a49420826707f660931002ba2338fbf0
Diffstat (limited to 'test/dialect/oracle/test_dialect.py')
-rw-r--r--test/dialect/oracle/test_dialect.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/dialect/oracle/test_dialect.py b/test/dialect/oracle/test_dialect.py
index aafad8dc1..0bde673c0 100644
--- a/test/dialect/oracle/test_dialect.py
+++ b/test/dialect/oracle/test_dialect.py
@@ -473,9 +473,15 @@ class CompatFlagsTest(fixtures.TestBase, AssertsCompiledSQL):
return server_version
dialect = oracle.dialect(
- dbapi=Mock(version="0.0.0", paramstyle="named"), **kw
+ dbapi=Mock(
+ version="0.0.0",
+ paramstyle="named",
+ ),
+ **kw
)
+
dialect._get_server_version_info = server_version_info
+ dialect.get_isolation_level = Mock()
dialect._check_unicode_returns = Mock()
dialect._check_unicode_description = Mock()
dialect._get_default_schema_name = Mock()