summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/provision.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/testing/provision.py')
-rw-r--r--lib/sqlalchemy/testing/provision.py13
1 files changed, 9 insertions, 4 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")