Skip to content

Commit f3a3cfd

Browse files
committed
fix: update references to OneLoginException
1 parent 74c7f4f commit f3a3cfd

File tree

2 files changed

+50
-1
lines changed

2 files changed

+50
-1
lines changed

onelogin/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
from onelogin.api_response import ApiResponse
4141
from onelogin.api_client import ApiClient
4242
from onelogin.configuration import Configuration
43-
from onelogin.exceptions import OpenApiException
43+
from onelogin.exceptions import OneLoginException
4444
from onelogin.exceptions import ApiTypeError
4545
from onelogin.exceptions import ApiValueError
4646
from onelogin.exceptions import ApiKeyError

test_sdk.py

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import onelogin
2+
from onelogin.rest import ApiException
3+
from pprint import pprint
4+
5+
# Simple test to check if the SDK can be imported and basic objects can be created
6+
print("SDK Import Test")
7+
print(f"SDK Version: {onelogin.__version__}")
8+
9+
# Test creating configuration
10+
print("\nTesting Configuration creation")
11+
try:
12+
configuration = onelogin.Configuration(
13+
host="https://example.onelogin.com"
14+
)
15+
print("✅ Configuration created successfully")
16+
except Exception as e:
17+
print(f"❌ Failed to create configuration: {e}")
18+
19+
# Test API client creation
20+
print("\nTesting ApiClient creation")
21+
try:
22+
api_client = onelogin.ApiClient(configuration)
23+
print("✅ ApiClient created successfully")
24+
except Exception as e:
25+
print(f"❌ Failed to create ApiClient: {e}")
26+
27+
# Test API instance creation
28+
print("\nTesting API instance creation")
29+
try:
30+
users_api = onelogin.UsersV2Api(api_client)
31+
oauth_api = onelogin.OAuth2Api(api_client)
32+
print("✅ API instances created successfully")
33+
except Exception as e:
34+
print(f"❌ Failed to create API instances: {e}")
35+
36+
# Test model creation
37+
print("\nTesting model creation")
38+
try:
39+
user = onelogin.User(
40+
email="test@example.com",
41+
firstname="Test",
42+
lastname="User"
43+
)
44+
print("✅ User model created successfully")
45+
print(f"User data: {user.model_dump()}")
46+
except Exception as e:
47+
print(f"❌ Failed to create User model: {e}")
48+
49+
print("\nBasic SDK functionality test completed!")

0 commit comments

Comments
 (0)