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 ("\n Testing 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 ("\n Testing 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 ("\n Testing 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 ("\n Testing 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 ("\n Basic SDK functionality test completed!" )
0 commit comments