Skip to content

Commit d3938ac

Browse files
chore: update SDK to v0.10.3
1 parent 59767aa commit d3938ac

70 files changed

Lines changed: 21236 additions & 21242 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
project = "X API SDK"
2222
copyright = "2024, X Developer Platform"
2323
author = "X Developer Platform"
24-
release = "0.10.2"
25-
version = "0.10.2"
24+
release = "0.10.3"
25+
version = "0.10.3"
2626

2727
# -- General configuration ----------------------------------------------------
2828

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ build-backend = "hatchling.build"
1414

1515
[project]
1616
name = "xdk"
17-
version = "0.10.2"
17+
version = "0.10.3"
1818
description = "Python SDK for the X API"
1919
authors = [
2020
{name = "X Developer Platform", email = "devs@x.com"},

tests/account_activity/test_contracts.py

Lines changed: 136 additions & 136 deletions
Large diffs are not rendered by default.

tests/account_activity/test_structure.py

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,22 @@ def setup_class(self):
4343
self.account_activity_client = getattr(self.client, "account_activity")
4444

4545

46-
def test_validate_subscription_exists(self):
47-
"""Test that validate_subscription method exists with correct signature."""
46+
def test_get_subscriptions_exists(self):
47+
"""Test that get_subscriptions method exists with correct signature."""
4848
# Check method exists
49-
method = getattr(AccountActivityClient, "validate_subscription", None)
49+
method = getattr(AccountActivityClient, "get_subscriptions", None)
5050
assert (
5151
method is not None
52-
), f"Method validate_subscription does not exist on AccountActivityClient"
52+
), f"Method get_subscriptions does not exist on AccountActivityClient"
5353
# Check method is callable
54-
assert callable(method), f"validate_subscription is not callable"
54+
assert callable(method), f"get_subscriptions is not callable"
5555
# Check method signature
5656
sig = inspect.signature(method)
5757
params = list(sig.parameters.keys())
5858
# Should have 'self' as first parameter
5959
assert (
6060
len(params) >= 1
61-
), f"validate_subscription should have at least 'self' parameter"
61+
), f"get_subscriptions should have at least 'self' parameter"
6262
assert (
6363
params[0] == "self"
6464
), f"First parameter should be 'self', got '{params[0]}'"
@@ -69,7 +69,7 @@ def test_validate_subscription_exists(self):
6969
for required_param in required_params:
7070
assert (
7171
required_param in params
72-
), f"Required parameter '{required_param}' missing from validate_subscription"
72+
), f"Required parameter '{required_param}' missing from get_subscriptions"
7373
# Check optional parameters have defaults (excluding 'self')
7474
optional_params = []
7575
for optional_param in optional_params:
@@ -80,32 +80,32 @@ def test_validate_subscription_exists(self):
8080
), f"Optional parameter '{optional_param}' should have a default value"
8181

8282

83-
def test_validate_subscription_return_annotation(self):
84-
"""Test that validate_subscription has proper return type annotation."""
85-
method = getattr(AccountActivityClient, "validate_subscription")
83+
def test_get_subscriptions_return_annotation(self):
84+
"""Test that get_subscriptions has proper return type annotation."""
85+
method = getattr(AccountActivityClient, "get_subscriptions")
8686
sig = inspect.signature(method)
8787
# Check return annotation exists
8888
assert (
8989
sig.return_annotation is not inspect.Signature.empty
90-
), f"Method validate_subscription should have return type annotation"
90+
), f"Method get_subscriptions should have return type annotation"
9191

9292

93-
def test_create_subscription_exists(self):
94-
"""Test that create_subscription method exists with correct signature."""
93+
def test_validate_subscription_exists(self):
94+
"""Test that validate_subscription method exists with correct signature."""
9595
# Check method exists
96-
method = getattr(AccountActivityClient, "create_subscription", None)
96+
method = getattr(AccountActivityClient, "validate_subscription", None)
9797
assert (
9898
method is not None
99-
), f"Method create_subscription does not exist on AccountActivityClient"
99+
), f"Method validate_subscription does not exist on AccountActivityClient"
100100
# Check method is callable
101-
assert callable(method), f"create_subscription is not callable"
101+
assert callable(method), f"validate_subscription is not callable"
102102
# Check method signature
103103
sig = inspect.signature(method)
104104
params = list(sig.parameters.keys())
105105
# Should have 'self' as first parameter
106106
assert (
107107
len(params) >= 1
108-
), f"create_subscription should have at least 'self' parameter"
108+
), f"validate_subscription should have at least 'self' parameter"
109109
assert (
110110
params[0] == "self"
111111
), f"First parameter should be 'self', got '{params[0]}'"
@@ -116,7 +116,7 @@ def test_create_subscription_exists(self):
116116
for required_param in required_params:
117117
assert (
118118
required_param in params
119-
), f"Required parameter '{required_param}' missing from create_subscription"
119+
), f"Required parameter '{required_param}' missing from validate_subscription"
120120
# Check optional parameters have defaults (excluding 'self')
121121
optional_params = []
122122
for optional_param in optional_params:
@@ -127,32 +127,32 @@ def test_create_subscription_exists(self):
127127
), f"Optional parameter '{optional_param}' should have a default value"
128128

129129

130-
def test_create_subscription_return_annotation(self):
131-
"""Test that create_subscription has proper return type annotation."""
132-
method = getattr(AccountActivityClient, "create_subscription")
130+
def test_validate_subscription_return_annotation(self):
131+
"""Test that validate_subscription has proper return type annotation."""
132+
method = getattr(AccountActivityClient, "validate_subscription")
133133
sig = inspect.signature(method)
134134
# Check return annotation exists
135135
assert (
136136
sig.return_annotation is not inspect.Signature.empty
137-
), f"Method create_subscription should have return type annotation"
137+
), f"Method validate_subscription should have return type annotation"
138138

139139

140-
def test_get_subscriptions_exists(self):
141-
"""Test that get_subscriptions method exists with correct signature."""
140+
def test_create_subscription_exists(self):
141+
"""Test that create_subscription method exists with correct signature."""
142142
# Check method exists
143-
method = getattr(AccountActivityClient, "get_subscriptions", None)
143+
method = getattr(AccountActivityClient, "create_subscription", None)
144144
assert (
145145
method is not None
146-
), f"Method get_subscriptions does not exist on AccountActivityClient"
146+
), f"Method create_subscription does not exist on AccountActivityClient"
147147
# Check method is callable
148-
assert callable(method), f"get_subscriptions is not callable"
148+
assert callable(method), f"create_subscription is not callable"
149149
# Check method signature
150150
sig = inspect.signature(method)
151151
params = list(sig.parameters.keys())
152152
# Should have 'self' as first parameter
153153
assert (
154154
len(params) >= 1
155-
), f"get_subscriptions should have at least 'self' parameter"
155+
), f"create_subscription should have at least 'self' parameter"
156156
assert (
157157
params[0] == "self"
158158
), f"First parameter should be 'self', got '{params[0]}'"
@@ -163,7 +163,7 @@ def test_get_subscriptions_exists(self):
163163
for required_param in required_params:
164164
assert (
165165
required_param in params
166-
), f"Required parameter '{required_param}' missing from get_subscriptions"
166+
), f"Required parameter '{required_param}' missing from create_subscription"
167167
# Check optional parameters have defaults (excluding 'self')
168168
optional_params = []
169169
for optional_param in optional_params:
@@ -174,14 +174,14 @@ def test_get_subscriptions_exists(self):
174174
), f"Optional parameter '{optional_param}' should have a default value"
175175

176176

177-
def test_get_subscriptions_return_annotation(self):
178-
"""Test that get_subscriptions has proper return type annotation."""
179-
method = getattr(AccountActivityClient, "get_subscriptions")
177+
def test_create_subscription_return_annotation(self):
178+
"""Test that create_subscription has proper return type annotation."""
179+
method = getattr(AccountActivityClient, "create_subscription")
180180
sig = inspect.signature(method)
181181
# Check return annotation exists
182182
assert (
183183
sig.return_annotation is not inspect.Signature.empty
184-
), f"Method get_subscriptions should have return type annotation"
184+
), f"Method create_subscription should have return type annotation"
185185

186186

187187
def test_delete_subscription_exists(self):
@@ -280,9 +280,9 @@ def test_get_subscription_count_return_annotation(self):
280280
def test_all_expected_methods_exist(self):
281281
"""Test that all expected methods exist on the client."""
282282
expected_methods = [
283+
"get_subscriptions",
283284
"validate_subscription",
284285
"create_subscription",
285-
"get_subscriptions",
286286
"delete_subscription",
287287
"get_subscription_count",
288288
]

0 commit comments

Comments
 (0)