summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2016-02-03 20:37:42 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2016-02-03 20:37:42 -0500
commit93c5328e66d8491e73027f6e789df2255c4fa767 (patch)
tree65756e62b2cae7e4db936824763a4492dd499632
parentc1316a299257fae8264c8038d83e415f4605fde7 (diff)
downloadsqlalchemy-93c5328e66d8491e73027f6e789df2255c4fa767.tar.gz
- more oracle fixes
-rw-r--r--lib/sqlalchemy/testing/provision.py13
-rw-r--r--lib/sqlalchemy/testing/suite/test_reflection.py2
2 files changed, 10 insertions, 5 deletions
diff --git a/lib/sqlalchemy/testing/provision.py b/lib/sqlalchemy/testing/provision.py
index 555a75b53..0feb41987 100644
--- a/lib/sqlalchemy/testing/provision.py
+++ b/lib/sqlalchemy/testing/provision.py
@@ -237,12 +237,17 @@ def _mysql_drop_db(cfg, eng, ident):
@_create_db.for_db("oracle")
def _oracle_create_db(cfg, eng, ident):
+ # NOTE: make sure you've run "ALTER DATABASE default tablespace users" or
+ # similar, so that the default tablespace is not "system"; reflection will
+ # fail otherwise
with eng.connect() as conn:
conn.execute("create user %s identified by xe" % ident)
conn.execute("create user %s_ts1 identified by xe" % ident)
conn.execute("create user %s_ts2 identified by xe" % ident)
conn.execute("grant dba to %s" % (ident, ))
-
+ conn.execute("grant unlimited tablespace to %s" % ident)
+ conn.execute("grant unlimited tablespace to %s_ts1" % ident)
+ conn.execute("grant unlimited tablespace to %s_ts2" % ident)
@_configure_follower.for_db("oracle")
def _oracle_configure_follower(config, ident):
@@ -253,9 +258,9 @@ def _oracle_configure_follower(config, ident):
@_drop_db.for_db("oracle")
def _oracle_drop_db(cfg, eng, ident):
with eng.connect() as conn:
- conn.execute("drop user %s" % ident)
- conn.execute("drop user %s_ts1" % ident)
- conn.execute("drop user %s_ts2" % ident)
+ conn.execute("drop user %s cascade" % ident)
+ conn.execute("drop user %s_ts1 cascade" % ident)
+ conn.execute("drop user %s_ts2 cascade" % ident)
@_follower_url_from_main.for_db("oracle")
diff --git a/lib/sqlalchemy/testing/suite/test_reflection.py b/lib/sqlalchemy/testing/suite/test_reflection.py
index 0457b2e26..1874f6210 100644
--- a/lib/sqlalchemy/testing/suite/test_reflection.py
+++ b/lib/sqlalchemy/testing/suite/test_reflection.py
@@ -113,7 +113,7 @@ class ComponentReflectionTest(fixtures.TablesTest):
# temp table fixture
if testing.against("oracle"):
kw = {
- 'prefixes': ["TEMPORARY", "GLOBAL"],
+ 'prefixes': ["GLOBAL TEMPORARY"],
'oracle_on_commit': 'PRESERVE ROWS'
}
else: