forked from pool/python-oci-sdk
Ondřej Súkup
4072e704fa
- Update to version 2.10.3 + Support for the Data Science service + Support for calling Oracle Cloud Infrastructure services in the ap-osaka-1 and ap-melbourne-1 regions - from version 2.10.2 + Support for the Application Migration service + Support for the Data Flow service + Support for the Data Catalog service + Support for cross-shape Data Guard in the Database service + Support for offline data export in the Data Transfer service - from version 2.10.1 + Support for getting DRG redundancy status in the Networking service + Support for cloning autonomous databases from backups in the Database service - from version 2.10.0 + Support for a description field on route rules and security rules in the Networking service + Support for starting and stopping Digital Assistant instances in the Digital Assistant service + Support for shared database homes on Exadata, bare metal, and virtual machine instances in the Database service + Support for tracking a number of Database service operations through the Work Requests service + Field db_home_id in list_databases from database service is changed from required to optional - Refresh patches for new version + ops_fixture-order.patch + ops_relax-python-depends.patch - Update file list to fix Python imports for unvendoring OBS-URL: https://build.opensuse.org/request/show/771560 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-oci-sdk?expand=0&rev=3
118 lines
4.1 KiB
Diff
118 lines
4.1 KiB
Diff
Author: Sean Marlow <sean.marlow@suse.com>
|
|
Date: 2019-12-11
|
|
Source: https://github.com/oracle/oci-python-sdk/issues/196
|
|
|
|
diff -Nru oci-python-sdk-2.10.3.orig/tests/unit/test_basic_api_calls.py oci-python-sdk-2.10.3/tests/unit/test_basic_api_calls.py
|
|
--- oci-python-sdk-2.10.3.orig/tests/unit/test_basic_api_calls.py 2020-02-04 22:53:15.000000000 +0100
|
|
+++ oci-python-sdk-2.10.3/tests/unit/test_basic_api_calls.py 2020-02-07 12:48:24.663500407 +0100
|
|
@@ -4,7 +4,7 @@
|
|
import oci
|
|
|
|
|
|
-def test_identity_list_users(identity, config):
|
|
+def test_identity_list_users(config, identity):
|
|
response = identity.list_users(config["tenancy"])
|
|
|
|
assert response is not None
|
|
@@ -30,7 +30,7 @@
|
|
assert response.request_id is not None
|
|
|
|
|
|
-def test_limit(identity, config):
|
|
+def test_limit(config, identity):
|
|
response = identity.list_users(config["tenancy"], limit=1)
|
|
|
|
assert response is not None
|
|
diff -Nru oci-python-sdk-2.10.3.orig/tests/unit/test_basic_api_calls.py.orig oci-python-sdk-2.10.3/tests/unit/test_basic_api_calls.py.orig
|
|
--- oci-python-sdk-2.10.3.orig/tests/unit/test_basic_api_calls.py.orig 1970-01-01 01:00:00.000000000 +0100
|
|
+++ oci-python-sdk-2.10.3/tests/unit/test_basic_api_calls.py.orig 2020-02-04 22:53:15.000000000 +0100
|
|
@@ -0,0 +1,40 @@
|
|
+# coding: utf-8
|
|
+# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
|
+
|
|
+import oci
|
|
+
|
|
+
|
|
+def test_identity_list_users(identity, config):
|
|
+ response = identity.list_users(config["tenancy"])
|
|
+
|
|
+ assert response is not None
|
|
+ assert len(response.data) > 0
|
|
+ assert type(response.data[0]) is oci.identity.models.User
|
|
+ assert response.status == 200
|
|
+ assert response.request_id is not None
|
|
+
|
|
+
|
|
+def test_vcn_list_vcns(virtual_network, config):
|
|
+ response = virtual_network.list_vcns(config["tenancy"])
|
|
+
|
|
+ assert response is not None
|
|
+ assert response.status == 200
|
|
+ assert response.request_id is not None
|
|
+
|
|
+
|
|
+def test_vcn_list_instances(compute, config):
|
|
+ response = compute.list_instances(config["tenancy"])
|
|
+
|
|
+ assert response is not None
|
|
+ assert response.status == 200
|
|
+ assert response.request_id is not None
|
|
+
|
|
+
|
|
+def test_limit(identity, config):
|
|
+ response = identity.list_users(config["tenancy"], limit=1)
|
|
+
|
|
+ assert response is not None
|
|
+ assert len(response.data) == 1
|
|
+ assert type(response.data[0]) is oci.identity.models.User
|
|
+ assert response.status == 200
|
|
+ assert response.request_id is not None
|
|
diff -Nru oci-python-sdk-2.10.3.orig/tests/unit/test_waiters.py oci-python-sdk-2.10.3/tests/unit/test_waiters.py
|
|
--- oci-python-sdk-2.10.3.orig/tests/unit/test_waiters.py 2020-02-04 22:53:15.000000000 +0100
|
|
+++ oci-python-sdk-2.10.3/tests/unit/test_waiters.py 2020-02-07 12:48:24.663500407 +0100
|
|
@@ -108,7 +108,7 @@
|
|
assert total_time < 60 * 5
|
|
|
|
|
|
-def test_invalid_operation(identity, config):
|
|
+def test_invalid_operation(config, identity):
|
|
# Create User
|
|
request = oci.identity.models.CreateUserDetails()
|
|
request.compartment_id = config["tenancy"]
|
|
@@ -131,7 +131,7 @@
|
|
oci.wait_until(identity, response, 'not a real property', 'test')
|
|
|
|
|
|
-def test_already_in_state(identity, config):
|
|
+def test_already_in_state(config, identity):
|
|
description = 'test user'
|
|
request = oci.identity.models.CreateUserDetails()
|
|
request.compartment_id = config["tenancy"]
|
|
@@ -151,7 +151,7 @@
|
|
identity.delete_user(user_id)
|
|
|
|
|
|
-def test_wait_time_exceeded(identity, config):
|
|
+def test_wait_time_exceeded(config, identity):
|
|
description = 'test user'
|
|
request = oci.identity.models.CreateUserDetails()
|
|
request.compartment_id = config["tenancy"]
|
|
@@ -182,7 +182,7 @@
|
|
assert str(ve.value) == 'If an evaluate_response function is provided, then the property argument cannot also be provided'
|
|
|
|
|
|
-def test_eval_function_lambda(identity, config):
|
|
+def test_eval_function_lambda(config, identity):
|
|
user_id = None
|
|
try:
|
|
description = 'test user'
|
|
@@ -206,7 +206,7 @@
|
|
identity.delete_user(user_id)
|
|
|
|
|
|
-def test_eval_function_func_ref(identity, config):
|
|
+def test_eval_function_func_ref(config, identity):
|
|
user_id = None
|
|
try:
|
|
description = 'test user'
|