forked from x10xchange/python_sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimple_test.py
More file actions
37 lines (29 loc) · 1.21 KB
/
simple_test.py
File metadata and controls
37 lines (29 loc) · 1.21 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
31
32
33
34
35
36
37
"""
Simple test to verify native sync implementation is working.
"""
def test_basic_imports():
"""Test that we can import the native sync classes without dependencies."""
print("Testing basic native sync imports...")
try:
# Test direct native sync imports
from extended.api.base_native_sync import BaseNativeSyncClient
print("✅ BaseNativeSyncClient import successful")
from extended.api.info_native_sync import NativeSyncInfoAPI
print("✅ NativeSyncInfoAPI import successful")
from extended.api.exchange_native_sync import NativeSyncExchangeAPI
print("✅ NativeSyncExchangeAPI import successful")
# Test that BaseNativeSyncClient uses requests
import inspect
source = inspect.getsource(BaseNativeSyncClient.__init__)
if 'requests.Session()' in source:
print("✅ BaseNativeSyncClient uses requests.Session()")
else:
print("❌ BaseNativeSyncClient doesn't use requests.Session()")
return True
except Exception as e:
print(f"❌ Import failed: {e}")
import traceback
traceback.print_exc()
return False
if __name__ == "__main__":
test_basic_imports()