python-oracledb/tests
Anthony Tuininga d71943b031 Prevent test failures with slow databases. 2022-11-23 10:58:40 -07:00
..
sql Tweaks to ensure that test suite can run cleanly against cloud 2022-11-10 10:47:09 -07:00
README.md Make externalauth a common parameter (which is optional for standalone 2022-06-22 15:31:54 -06:00
create_schema.py Tweaks to ensure that test suite can run cleanly against cloud 2022-11-10 10:47:09 -07:00
drop_schema.py Initial commit. 2022-05-20 16:08:18 -06:00
test_1000_module.py Initial commit. 2022-05-20 16:08:18 -06:00
test_1100_connection.py Prevent test failures with slow databases. 2022-11-23 10:58:40 -07:00
test_1300_cursor_var.py Fixed bug preventing a cursor from being reused after it was bound as a 2022-11-01 14:34:38 -06:00
test_1400_datetime_var.py Initial commit. 2022-05-20 16:08:18 -06:00
test_1500_types.py Update doc and release note and add test cases for type UROWID. 2022-09-28 18:08:16 -06:00
test_1600_dml_returning.py Allow for the case when only a parenthesis separates the RETURNING 2022-11-22 10:12:51 -07:00
test_1700_error.py Initial commit. 2022-05-20 16:08:18 -06:00
test_1800_interval_var.py Initial commit. 2022-05-20 16:08:18 -06:00
test_1900_lob_var.py The error "DPY-2030: LOB offset must be greater than zero" is now raised 2022-07-19 18:02:33 -06:00
test_2000_long_var.py Initial commit. 2022-05-20 16:08:18 -06:00
test_2100_nchar_var.py Initial commit. 2022-05-20 16:08:18 -06:00
test_2200_number_var.py Fixed bug causing a leading zero to be returned when certain numbers are 2022-11-01 15:31:11 -06:00
test_2300_object_var.py Throw error DPY-2037: no object type specified for object variable when 2022-11-07 16:45:40 -07:00
test_2400_pool.py Fixed bug creating a homogeneous connection pool with a proxy user 2022-11-17 20:37:59 -07:00
test_2500_string_var.py Added support for transforming SYS.XMLTYPE into strings as is done in 2022-11-07 10:27:37 -07:00
test_2600_timestamp_var.py Initial commit. 2022-05-20 16:08:18 -06:00
test_2700_aq.py Tweaks to ensure that test suite can run cleanly against cloud 2022-11-10 10:47:09 -07:00
test_2800_bulk_aq.py Added support for enqueuing and dequeing AQ messages as JSON. 2022-08-27 15:56:53 -06:00
test_2900_rowid.py Added test for fetching NULL rowids; simplified handling of getting data 2022-10-18 16:32:05 -06:00
test_3000_subscription.py Initial commit. 2022-05-20 16:08:18 -06:00
test_3100_boolean_var.py Initial commit. 2022-05-20 16:08:18 -06:00
test_3200_features_12_1.py Fixed bug when calling Cursor.executemany() with the "batcherrors" 2022-11-10 15:53:17 -07:00
test_3300_soda_database.py Initial commit. 2022-05-20 16:08:18 -06:00
test_3400_soda_collection.py Added test cases for insertManyAndGet(). 2022-09-28 18:06:03 -06:00
test_3500_json.py Initial commit. 2022-05-20 16:08:18 -06:00
test_3600_outputtypehandler.py Thick: fixed issue fetching NCLOB with oracledb.defaults.fetch_lobs = 2022-06-09 13:58:01 -06:00
test_3700_var.py Added support for binding and fetching data of type DB_TYPE_OBJECT 2022-11-01 14:33:39 -06:00
test_3800_typehandler.py Initial commit. 2022-05-20 16:08:18 -06:00
test_3900_cursor_execute.py Initial commit. 2022-05-20 16:08:18 -06:00
test_4000_cursor_executemany.py Fixed bug with the deferral of type assignment when creating variables 2022-07-15 21:11:24 -06:00
test_4100_cursor_callproc.py Initial commit. 2022-05-20 16:08:18 -06:00
test_4200_cursor_scrollable.py Initial commit. 2022-05-20 16:08:18 -06:00
test_4300_cursor_other.py Fixed bug determining bind variables when found between two comment blocks 2022-11-23 10:40:46 -07:00
test_4400_tpc.py Added test case for tpc_rollback() with xid parameter. 2022-11-07 09:25:53 -07:00
test_4500_connect_params.py Added support for connecting to CMAN using "(SOURCE_ROUTE=YES)" in the 2022-11-07 10:35:57 -07:00
test_4600_type_changes.py Initial commit. 2022-05-20 16:08:18 -06:00
test_4700_pool_params.py Test suite improvements. 2022-08-27 11:09:54 -06:00
test_4800_timestamp_ltz_var.py Thin: return the same value for timestamp with time zone columns as thick 2022-06-06 10:50:30 -06:00
test_4900_timestamp_tz_var.py Correct typos. 2022-06-10 10:31:18 -06:00
test_5000_externalauth.py Make externalauth a common parameter (which is optional for standalone 2022-06-22 15:31:54 -06:00
test_env.py Tweaks to ensure that test suite can run cleanly against cloud 2022-11-10 10:47:09 -07:00

README.md

This directory contains the test suite for python-oracledb.

  1. The schemas and SQL objects that are referenced in the test suite can be created by running the Python script create_schema.py. The script requires administrative privileges and will prompt for these credentials as well as the names of the schemas that will be created, unless a number of environment variables are set as documented in the Python script test_env.py. Run the script using the following command:

    python create_schema.py
    
  2. Run the test suite by issuing the following command in the top-level directory of your oracledb installation:

    tox
    

    This will build the module in an independent environment and run the test suite using the module that was just built in that environment. Alternatively, you can use the currently installed build of oracledb and run the following command instead:

    python -m unittest discover -v -s tests
    

    You may also run each of the test scripts independently, as in:

    python test_1000_module.py
    
  3. After running the test suite, the schemas can be dropped by running the Python script drop_schema.py. The script requires administrative privileges and will prompt for these credentials as well as the names of the schemas that will be dropped, unless a number of environment variables are set as documented in the Python script test_env.py. Run the script using the following command:

    python drop_schema.py
    
  4. Enable tests that require extra configuration

    The following test(s) are automatically skipped if their required environment variable(s) and setup is not available.

    4.1 test_5000_externalauth.py

     This test aims to test the usage of external authentication.
    
     - Set the PYO_TEST_EXTERNAL_USER environment variable to the externally
       identified user that will be connected using external authentication.
    
     - Set up external authentication. See
       [Connecting Using External Authentication][4] for creating an
       Oracle Wallet or enabling OS authentication.
    
     - Run the following SQL commands as a user with administrative
       privileges (such as SYSTEM or ADMIN) to allow the external user to
       connect to the database and behave as proxy for testing external
       authentication with proxy:
    
           grant create session to <External User>;
    
           alter user <Schema Owner> grant connect through <External User>;