forked from oracle/python-cx_Oracle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSetupTest.py
More file actions
31 lines (24 loc) · 1.05 KB
/
SetupTest.py
File metadata and controls
31 lines (24 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#------------------------------------------------------------------------------
# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# SetupTest.py
#
# Creates users and populates their schemas with the tables and packages
# necessary for the cx_Oracle test suite.
#------------------------------------------------------------------------------
import cx_Oracle
import TestEnv
import DropTest
# connect as administrative user (usually SYSTEM or ADMIN)
conn = cx_Oracle.connect(TestEnv.GetAdminConnectString())
# drop existing users and editions, if applicable
DropTest.DropTests(conn)
# create test schemas
print("Creating test schemas...")
TestEnv.RunSqlScript(conn, "SetupTest",
main_user = TestEnv.GetMainUser(),
main_password = TestEnv.GetMainPassword(),
proxy_user = TestEnv.GetProxyUser(),
proxy_password = TestEnv.GetProxyPassword())
print("Done.")